Skip to content

var_export - provide 'null' instead of 'NULL' #2422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions ext/standard/tests/general_functions/var_dump.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -481,12 +481,12 @@ array(0) {
-- Iteration 2 --
array(1) {
[0]=>
NULL
null
}
-- Iteration 3 --
array(1) {
[0]=>
NULL
null
}
-- Iteration 4 --
array(1) {
Expand Down Expand Up @@ -803,7 +803,7 @@ object(object_class)#5 (7) {
int(11)
}
-- Iteration 9 --
NULL
null

** Testing var_dump() on objects having circular reference **
object(object_class)#13 (8) {
Expand Down Expand Up @@ -875,7 +875,7 @@ array(4) {
[2]=>
bool(true)
[3]=>
NULL
null
}
-- Iteration 3 --
array(4) {
Expand Down Expand Up @@ -915,7 +915,7 @@ array(6) {
-- Iteration 5 --
array(4) {
[0]=>
NULL
null
[1]=>
float(20000000000)
[2]=>
Expand All @@ -928,7 +928,7 @@ array(4) {
[0]=>
string(27) "array(1,2,3,4)1.0000002TRUE"
[1]=>
NULL
null
[2]=>
float(4611333)
[3]=>
Expand All @@ -937,13 +937,13 @@ array(4) {

*** Testing var_dump() on miscelleneous input arguments ***
-- Iteration 1 --
NULL
null
-- Iteration 2 --
NULL
null
-- Iteration 3 --
NULL
null
-- Iteration 4 --
NULL
null

*** Testing var_dump() on multiple arguments ***
array(15) {
Expand Down Expand Up @@ -1125,12 +1125,12 @@ array(15) {
[1]=>
array(1) {
[0]=>
NULL
null
}
[2]=>
array(1) {
[0]=>
NULL
null
}
[3]=>
array(1) {
Expand Down Expand Up @@ -1463,17 +1463,17 @@ array(9) {
int(11)
}
[8]=>
NULL
null
}
array(4) {
[0]=>
NULL
null
[1]=>
NULL
null
[2]=>
NULL
null
[3]=>
NULL
null
}
array(6) {
[0]=>
Expand Down Expand Up @@ -1501,7 +1501,7 @@ array(6) {
[2]=>
bool(true)
[3]=>
NULL
null
}
[2]=>
array(4) {
Expand Down Expand Up @@ -1541,7 +1541,7 @@ array(6) {
[4]=>
array(4) {
[0]=>
NULL
null
[1]=>
float(20000000000)
[2]=>
Expand All @@ -1554,7 +1554,7 @@ array(6) {
[0]=>
string(27) "array(1,2,3,4)1.0000002TRUE"
[1]=>
NULL
null
[2]=>
float(4611333)
[3]=>
Expand Down
40 changes: 20 additions & 20 deletions ext/standard/tests/general_functions/var_dump_64bit.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -481,12 +481,12 @@ array(0) {
-- Iteration 2 --
array(1) {
[0]=>
NULL
null
}
-- Iteration 3 --
array(1) {
[0]=>
NULL
null
}
-- Iteration 4 --
array(1) {
Expand Down Expand Up @@ -803,7 +803,7 @@ object(object_class)#5 (7) {
int(11)
}
-- Iteration 9 --
NULL
null

** Testing var_dump() on objects having circular reference **
object(object_class)#13 (8) {
Expand Down Expand Up @@ -875,7 +875,7 @@ array(4) {
[2]=>
bool(true)
[3]=>
NULL
null
}
-- Iteration 3 --
array(4) {
Expand Down Expand Up @@ -915,7 +915,7 @@ array(6) {
-- Iteration 5 --
array(4) {
[0]=>
NULL
null
[1]=>
float(20000000000)
[2]=>
Expand All @@ -928,7 +928,7 @@ array(4) {
[0]=>
string(27) "array(1,2,3,4)1.0000002TRUE"
[1]=>
NULL
null
[2]=>
float(4611333)
[3]=>
Expand All @@ -937,13 +937,13 @@ array(4) {

*** Testing var_dump() on miscelleneous input arguments ***
-- Iteration 1 --
NULL
null
-- Iteration 2 --
NULL
null
-- Iteration 3 --
NULL
null
-- Iteration 4 --
NULL
null

*** Testing var_dump() on multiple arguments ***
array(15) {
Expand Down Expand Up @@ -1125,12 +1125,12 @@ array(15) {
[1]=>
array(1) {
[0]=>
NULL
null
}
[2]=>
array(1) {
[0]=>
NULL
null
}
[3]=>
array(1) {
Expand Down Expand Up @@ -1463,17 +1463,17 @@ array(9) {
int(11)
}
[8]=>
NULL
null
}
array(4) {
[0]=>
NULL
null
[1]=>
NULL
null
[2]=>
NULL
null
[3]=>
NULL
null
}
array(6) {
[0]=>
Expand Down Expand Up @@ -1501,7 +1501,7 @@ array(6) {
[2]=>
bool(true)
[3]=>
NULL
null
}
[2]=>
array(4) {
Expand Down Expand Up @@ -1541,7 +1541,7 @@ array(6) {
[4]=>
array(4) {
[0]=>
NULL
null
[1]=>
float(20000000000)
[2]=>
Expand All @@ -1554,7 +1554,7 @@ array(6) {
[0]=>
string(27) "array(1,2,3,4)1.0000002TRUE"
[1]=>
NULL
null
[2]=>
float(4611333)
[3]=>
Expand Down
46 changes: 23 additions & 23 deletions ext/standard/tests/general_functions/var_export-locale.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -693,25 +693,25 @@ string(9) "array (

Iteration 2
array (
0 => NULL,
0 => null,
)
array (
0 => NULL,
0 => null,
)
string(22) "array (
0 => NULL,
0 => null,
)"


Iteration 3
array (
0 => NULL,
0 => null,
)
array (
0 => NULL,
0 => null,
)
string(22) "array (
0 => NULL,
0 => null,
)"


Expand Down Expand Up @@ -970,7 +970,7 @@ myClass::__set_state(array(
'private_var' =>
foo::__set_state(array(
)),
'protected_var' => NULL,
'protected_var' => null,
'proected_var' =>
foo::__set_state(array(
)),
Expand All @@ -986,7 +986,7 @@ myClass::__set_state(array(
'private_var' =>
foo::__set_state(array(
)),
'protected_var' => NULL,
'protected_var' => null,
'proected_var' =>
foo::__set_state(array(
)),
Expand All @@ -1002,7 +1002,7 @@ string(293) "myClass::__set_state(array(
'private_var' =>
foo::__set_state(array(
)),
'protected_var' => NULL,
'protected_var' => null,
'proected_var' =>
foo::__set_state(array(
)),
Expand All @@ -1021,7 +1021,7 @@ myClass::__set_state(array(
'private_var' =>
foo::__set_state(array(
)),
'protected_var' => NULL,
'protected_var' => null,
'proected_var' =>
foo::__set_state(array(
)),
Expand All @@ -1037,7 +1037,7 @@ myClass::__set_state(array(
'private_var' =>
foo::__set_state(array(
)),
'protected_var' => NULL,
'protected_var' => null,
'proected_var' =>
foo::__set_state(array(
)),
Expand All @@ -1053,7 +1053,7 @@ string(293) "myClass::__set_state(array(
'private_var' =>
foo::__set_state(array(
)),
'protected_var' => NULL,
'protected_var' => null,
'proected_var' =>
foo::__set_state(array(
)),
Expand Down Expand Up @@ -1118,28 +1118,28 @@ string(36) "concreteClass::__set_state(array(
*** Output for null values ***

Iteration 1
NULL
NULL
string(4) "NULL"
null
null
string(4) "null"


Iteration 2
NULL
NULL
string(4) "NULL"
null
null
string(4) "null"


Iteration 3
NULL
NULL
string(4) "NULL"
null
null
string(4) "null"


*** Testing error conditions ***

Warning: var_export() expects at least 1 parameter, 0 given in %s on line %d
NULL
null
Warning: var_export() expects at most 2 parameters, 3 given in %s on line %d
NULL
null

Done
Loading
close