1--TEST-- 2Test var_export() function with valid null values 3--FILE-- 4<?php 5echo "*** Testing var_export() with valid null values ***\n"; 6 7// different valid null values 8$unset_var = array(); 9unset ($unset_var); // now a null 10$null_var = NULL; 11 12$valid_nulls = array( 13 "NULL" => NULL, 14 "null" => null, 15 "null_var" => $null_var, 16); 17 18/* Loop to check for above null values with var_export() */ 19echo "\n*** Output for null values ***\n"; 20foreach($valid_nulls as $key => $null_value) { 21 echo "\n-- Iteration: $key --\n"; 22 var_export( $null_value ); 23 echo "\n"; 24 var_export( $null_value, FALSE); 25 echo "\n"; 26 var_dump( var_export( $null_value, true) ); 27 echo "\n"; 28} 29?> 30--EXPECT-- 31*** Testing var_export() with valid null values *** 32 33*** Output for null values *** 34 35-- Iteration: NULL -- 36NULL 37NULL 38string(4) "NULL" 39 40 41-- Iteration: null -- 42NULL 43NULL 44string(4) "NULL" 45 46 47-- Iteration: null_var -- 48NULL 49NULL 50string(4) "NULL" 51 52