3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = "1234567890"; var_dump(isset($a[010])); // true var_dump(isset($a["010"])); // false; 10進数の10として認識されている var_dump($a["0x1"]); $a .= "a"; var_dump(isset($a["010"])); // true
Output for 7.0.0 - 7.1.0
bool(true) bool(false) Notice: A non well formed numeric value encountered in /in/PQ4Q1 on line 6 string(1) "1" bool(true)
Output for 4.3.3 - 4.4.9, 5.0.3 - 5.0.5, 5.1.1 - 5.6.28
bool(true) bool(false) string(1) "1" bool(true)
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/PQ4Q1 on line 9
Process exited with code 255.
Output for 5.0.0 - 5.0.2
bool(true) bool(false) string(1) "1" bool(false)
Output for 4.3.0 - 4.3.2
bool(true) Notice: Uninitialized string offset: 10 in /in/PQ4Q1 on line 5 bool(false) string(1) "1" bool(true)