3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ "true", true, 1, "1", "false", false, 0, "0", "a string", "a string ", "a \x00\x00\x00string", "Array ( [0] => a [1] => b [2] => c )", "a string [13] => Array ( [0] => yeah, this is in fact still the same string as [12] )" ]; header("Content-type: text/plain"); print_r($a); var_dump($a);
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.5 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
Array ( [0] => true [1] => 1 [2] => 1 [3] => 1 [4] => false [5] => [6] => 0 [7] => 0 [8] => a string [9] => a string [10] => a string [11] => Array ( [0] => a [1] => b [2] => c ) [12] => a string [13] => Array ( [0] => yeah, this is in fact still the same string as [12] ) ) array(13) { [0]=> string(4) "true" [1]=> bool(true) [2]=> int(1) [3]=> string(1) "1" [4]=> string(5) "false" [5]=> bool(false) [6]=> int(0) [7]=> string(1) "0" [8]=> string(8) "a string" [9]=> string(80) "a string " [10]=> string(11) "a string" [11]=> string(68) "Array ( [0] => a [1] => b [2] => c )" [12]=> string(105) "a string [13] => Array ( [0] => yeah, this is in fact still the same string as [12] )" }

preferences:
148.59 ms | 411 KiB | 5 Q