3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL); class testclass { var $dd = ""; } $test = new testclass(); if (isset($test->dd[0])){ echo "(A) TRUE \n"; }else{ echo "(A) FALSE \n"; } if (is_array($test->dd) && isset($test->dd[0])){ echo "(B) TRUE \n"; }else{ echo "(B) FALSE \n"; }
Output for 4.3.3 - 4.4.9, 5.1.3 - 7.1.0
(A) FALSE (B) FALSE
Output for 5.0.2 - 5.1.2
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/WKoHD on line 3 (A) FALSE (B) FALSE
Output for 5.0.0 - 5.0.1
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/WKoHD on line 3 (A) TRUE (B) FALSE
Output for 4.3.0 - 4.3.2
Notice: Uninitialized string offset: 0 in /in/WKoHD on line 5 (A) FALSE (B) FALSE