3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class X { private $y = null; public function __construct($y=null) { $this->y = (int)$y; } } function evilSearch($obj, $p=-2147483648, $q=2147483647, $max = 32, $c = 0) { if($c>$max) { return null; } $class = get_class($obj); $r = (int)(($p+$q)/2); $z = new $class($r); if($z>$obj) { return evilSearch($obj, $p, $r, $max, $c+1); } if($z<$obj) { return evilSearch($obj, $r, $q, $max, $c+1); } return $r; } echo('<pre>'); $test = new X(mt_rand()); var_dump(evilSearch($test), $test);
Output for 7.1.0
<pre>int(1888267830) object(X)#1 (1) { ["y":"X":private]=> int(1888267830) }
Output for 7.0.14
<pre>int(1621982987) object(X)#1 (1) { ["y":"X":private]=> int(1621982987) }
Output for 7.0.7
<pre>int(1071673442) object(X)#1 (1) { ["y":"X":private]=> int(1071673442) }
Output for 7.0.6
<pre>int(45487606) object(X)#1 (1) { ["y":"X":private]=> int(45487606) }
Output for 7.0.5
<pre>int(1772519175) object(X)#1 (1) { ["y":"X":private]=> int(1772519175) }
Output for 7.0.4
<pre>int(667588915) object(X)#1 (1) { ["y":"X":private]=> int(667588915) }
Output for 7.0.3
<pre>int(2106252745) object(X)#1 (1) { ["y":"X":private]=> int(2106252745) }
Output for 7.0.2
<pre>int(958060065) object(X)#1 (1) { ["y":"X":private]=> int(958060065) }
Output for 7.0.1
<pre>int(250928832) object(X)#1 (1) { ["y":"X":private]=> int(250928832) }
Output for 7.0.0
<pre>int(1084419507) object(X)#1 (1) { ["y":"X":private]=> int(1084419507) }
Output for hhvm-3.12.0
<pre>int(1562387868) object(X)#1 (1) { ["y":"X":private]=> int(1562387868) }
Output for hhvm-3.10.0
<pre>int(649720223) object(X)#1 (1) { ["y":"X":private]=> int(649720223) }
Output for 5.6.28
<pre>int(2090866321) object(X)#1 (1) { ["y":"X":private]=> int(2090866321) }
Output for 5.6.21
<pre>int(1577642169) object(X)#1 (1) { ["y":"X":private]=> int(1577642169) }
Output for 5.6.20
<pre>int(576411615) object(X)#1 (1) { ["y":"X":private]=> int(576411615) }
Output for 5.6.19
<pre>int(2078566051) object(X)#1 (1) { ["y":"X":private]=> int(2078566051) }
Output for 5.6.18
<pre>int(647291731) object(X)#1 (1) { ["y":"X":private]=> int(647291731) }
Output for 5.6.17
<pre>int(1182771366) object(X)#1 (1) { ["y":"X":private]=> int(1182771366) }
Output for 5.6.16
<pre>int(787517466) object(X)#1 (1) { ["y":"X":private]=> int(787517466) }
Output for 5.6.15
<pre>int(521609611) object(X)#1 (1) { ["y":"X":private]=> int(521609611) }
Output for 5.6.14
<pre>int(512482649) object(X)#1 (1) { ["y":"X":private]=> int(512482649) }
Output for 5.6.13
<pre>int(380907104) object(X)#1 (1) { ["y":"X":private]=> int(380907104) }
Output for 5.6.12
<pre>int(122065794) object(X)#1 (1) { ["y":"X":private]=> int(122065794) }
Output for 5.6.11
<pre>int(903065211) object(X)#1 (1) { ["y":"X":private]=> int(903065211) }
Output for 5.6.10
<pre>int(1864550818) object(X)#1 (1) { ["y":"X":private]=> int(1864550818) }
Output for 5.6.9
<pre>int(449287042) object(X)#1 (1) { ["y":"X":private]=> int(449287042) }
Output for 5.6.8
<pre>int(1066201681) object(X)#1 (1) { ["y":"X":private]=> int(1066201681) }
Output for 5.6.7
<pre>int(1411722174) object(X)#1 (1) { ["y":"X":private]=> int(1411722174) }
Output for 5.5.35
<pre>int(642802274) object(X)#1 (1) { ["y":"X":private]=> int(642802274) }
Output for 5.5.34
<pre>int(1654256385) object(X)#1 (1) { ["y":"X":private]=> int(1654256385) }
Output for 5.5.33
<pre>int(472823724) object(X)#1 (1) { ["y":"X":private]=> int(472823724) }
Output for 5.5.32
<pre>int(1544002284) object(X)#1 (1) { ["y":"X":private]=> int(1544002284) }
Output for 5.5.31
<pre>int(673902236) object(X)#1 (1) { ["y":"X":private]=> int(673902236) }
Output for 5.5.30
<pre>int(689961687) object(X)#1 (1) { ["y":"X":private]=> int(689961687) }
Output for 5.5.29
<pre>int(1061321568) object(X)#1 (1) { ["y":"X":private]=> int(1061321568) }
Output for 5.5.28
<pre>int(1264638179) object(X)#1 (1) { ["y":"X":private]=> int(1264638179) }
Output for 5.5.27
<pre>int(1890658828) object(X)#1 (1) { ["y":"X":private]=> int(1890658828) }
Output for 5.5.26
<pre>int(1398778044) object(X)#1 (1) { ["y":"X":private]=> int(1398778044) }
Output for 5.5.25
<pre>int(405966844) object(X)#1 (1) { ["y":"X":private]=> int(405966844) }
Output for 5.5.24
<pre>int(438521421) object(X)#1 (1) { ["y":"X":private]=> int(438521421) }
Output for 5.4.45
<pre>int(738041642) object(X)#1 (1) { ["y":"X":private]=> int(738041642) }
Output for 5.4.44
<pre>int(1425034345) object(X)#1 (1) { ["y":"X":private]=> int(1425034345) }
Output for 5.4.43
<pre>int(358490287) object(X)#1 (1) { ["y":"X":private]=> int(358490287) }
Output for 5.4.42
<pre>int(1667355300) object(X)#1 (1) { ["y":"X":private]=> int(1667355300) }
Output for 5.4.41
<pre>int(1235526460) object(X)#1 (1) { ["y":"X":private]=> int(1235526460) }
Output for 5.4.40
<pre>int(575728264) object(X)#1 (1) { ["y":"X":private]=> int(575728264) }
Output for 5.4.39
<pre>int(963545678) object(X)#1 (1) { ["y":"X":private]=> int(963545678) }
Output for 5.4.38
<pre>int(1340413929) object(X)#1 (1) { ["y":"X":private]=> int(1340413929) }
Output for 5.4.37
<pre>int(1250581589) object(X)#1 (1) { ["y":"X":private]=> int(1250581589) }
Output for 5.4.36
<pre>int(765057200) object(X)#1 (1) { ["y":"X":private]=> int(765057200) }
Output for 5.4.35
<pre>int(1956262866) object(X)#1 (1) { ["y":"X":private]=> int(1956262866) }
Output for 5.4.34
<pre>int(918954879) object(X)#1 (1) { ["y":"X":private]=> int(918954879) }
Output for 5.4.32
<pre>int(127430837) object(X)#1 (1) { ["y":"X":private]=> int(127430837) }
Output for 5.4.31
<pre>int(2007972269) object(X)#1 (1) { ["y":"X":private]=> int(2007972269) }
Output for 5.4.30
<pre>int(660531997) object(X)#1 (1) { ["y":"X":private]=> int(660531997) }
Output for 5.4.29
<pre>int(1159263771) object(X)#1 (1) { ["y":"X":private]=> int(1159263771) }
Output for 5.4.28
<pre>int(648203957) object(X)#1 (1) { ["y":"X":private]=> int(648203957) }
Output for 5.4.27
<pre>int(1967907856) object(X)#1 (1) { ["y":"X":private]=> int(1967907856) }
Output for 5.4.26
<pre>int(489084662) object(X)#1 (1) { ["y":"X":private]=> int(489084662) }
Output for 5.4.25
<pre>int(788196582) object(X)#1 (1) { ["y":"X":private]=> int(788196582) }
Output for 5.4.24
<pre>int(2055448080) object(X)#1 (1) { ["y":"X":private]=> int(2055448080) }
Output for 5.4.23
<pre>int(2111282952) object(X)#1 (1) { ["y":"X":private]=> int(2111282952) }
Output for 5.4.22
<pre>int(1905639650) object(X)#1 (1) { ["y":"X":private]=> int(1905639650) }
Output for 5.4.21
<pre>int(1291121591) object(X)#1 (1) { ["y":"X":private]=> int(1291121591) }
Output for 5.4.20
<pre>int(1232038602) object(X)#1 (1) { ["y":"X":private]=> int(1232038602) }
Output for 5.4.19
<pre>int(2118874325) object(X)#1 (1) { ["y":"X":private]=> int(2118874325) }
Output for 5.4.18
<pre>int(1868659515) object(X)#1 (1) { ["y":"X":private]=> int(1868659515) }
Output for 5.4.17
<pre>int(961709013) object(X)#1 (1) { ["y":"X":private]=> int(961709013) }
Output for 5.4.16
<pre>int(1028449261) object(X)#1 (1) { ["y":"X":private]=> int(1028449261) }
Output for 5.4.15
<pre>int(167639569) object(X)#1 (1) { ["y":"X":private]=> int(167639569) }
Output for 5.4.14
<pre>int(609117061) object(X)#1 (1) { ["y":"X":private]=> int(609117061) }
Output for 5.4.13
<pre>int(325202564) object(X)#1 (1) { ["y":"X":private]=> int(325202564) }
Output for 5.4.12
<pre>int(1879134886) object(X)#1 (1) { ["y":"X":private]=> int(1879134886) }
Output for 5.4.11
<pre>int(463610342) object(X)#1 (1) { ["y":"X":private]=> int(463610342) }
Output for 5.4.10
<pre>int(1499279830) object(X)#1 (1) { ["y":"X":private]=> int(1499279830) }
Output for 5.4.9
<pre>int(1887691846) object(X)#1 (1) { ["y":"X":private]=> int(1887691846) }
Output for 5.4.8
<pre>int(724009324) object(X)#1 (1) { ["y":"X":private]=> int(724009324) }
Output for 5.4.7
<pre>int(1464542108) object(X)#1 (1) { ["y":"X":private]=> int(1464542108) }
Output for 5.4.6
<pre>int(1039257222) object(X)#1 (1) { ["y":"X":private]=> int(1039257222) }
Output for 5.4.5
<pre>int(1458622001) object(X)#1 (1) { ["y":"X":private]=> int(1458622001) }
Output for 5.4.4
<pre>int(564369566) object(X)#1 (1) { ["y":"X":private]=> int(564369566) }
Output for 5.4.3
<pre>int(705595088) object(X)#1 (1) { ["y":"X":private]=> int(705595088) }
Output for 5.4.2
<pre>int(327047901) object(X)#1 (1) { ["y":"X":private]=> int(327047901) }
Output for 5.4.1
<pre>int(2022372684) object(X)#1 (1) { ["y":"X":private]=> int(2022372684) }
Output for 5.4.0
<pre>int(991226301) object(X)#1 (1) { ["y":"X":private]=> int(991226301) }
Output for 5.3.29
<pre>int(476052894) object(X)#1 (1) { ["y":"X":private]=> int(476052894) }
Output for 5.3.28
<pre>int(1202993011) object(X)#1 (1) { ["y":"X":private]=> int(1202993011) }
Output for 5.3.27
<pre>int(1802656491) object(X)#1 (1) { ["y":"X":private]=> int(1802656491) }
Output for 5.3.26
<pre>int(1435941527) object(X)#1 (1) { ["y":"X":private]=> int(1435941527) }
Output for 5.3.25
<pre>int(914366205) object(X)#1 (1) { ["y":"X":private]=> int(914366205) }
Output for 5.3.24
<pre>int(1627465142) object(X)#1 (1) { ["y":"X":private]=> int(1627465142) }
Output for 5.3.23
<pre>int(1936322413) object(X)#1 (1) { ["y":"X":private]=> int(1936322413) }
Output for 5.3.22
<pre>int(833065837) object(X)#1 (1) { ["y":"X":private]=> int(833065837) }
Output for 5.3.21
<pre>int(969372408) object(X)#1 (1) { ["y":"X":private]=> int(969372408) }
Output for 5.3.20
<pre>int(895751263) object(X)#1 (1) { ["y":"X":private]=> int(895751263) }
Output for 5.3.19
<pre>int(1491148015) object(X)#1 (1) { ["y":"X":private]=> int(1491148015) }
Output for 5.3.18
<pre>int(808606956) object(X)#1 (1) { ["y":"X":private]=> int(808606956) }
Output for 5.3.17
<pre>int(1397318728) object(X)#1 (1) { ["y":"X":private]=> int(1397318728) }
Output for 5.3.16
<pre>int(575295200) object(X)#1 (1) { ["y":"X":private]=> int(575295200) }
Output for 5.3.15
<pre>int(1853236271) object(X)#1 (1) { ["y":"X":private]=> int(1853236271) }
Output for 5.3.14
<pre>int(423291037) object(X)#1 (1) { ["y":"X":private]=> int(423291037) }
Output for 5.3.13
<pre>int(903272985) object(X)#1 (1) { ["y":"X":private]=> int(903272985) }
Output for 5.3.12
<pre>int(1433275892) object(X)#1 (1) { ["y":"X":private]=> int(1433275892) }
Output for 5.3.11
<pre>int(550088271) object(X)#1 (1) { ["y":"X":private]=> int(550088271) }
Output for 5.3.10
<pre>int(1068012679) object(X)#1 (1) { ["y":"X":private]=> int(1068012679) }
Output for 5.3.9
<pre>int(1676376973) object(X)#1 (1) { ["y":"X":private]=> int(1676376973) }
Output for 5.3.8
<pre>int(454108246) object(X)#1 (1) { ["y":"X":private]=> int(454108246) }
Output for 5.3.7
<pre>int(81699525) object(X)#1 (1) { ["y":"X":private]=> int(81699525) }
Output for 5.3.6
<pre>int(1494376060) object(X)#1 (1) { ["y":"X":private]=> int(1494376060) }
Output for 5.3.5
<pre>int(330903815) object(X)#1 (1) { ["y":"X":private]=> int(330903815) }
Output for 5.3.4
<pre>int(752624657) object(X)#1 (1) { ["y":"X":private]=> int(752624657) }
Output for 5.3.3
<pre>int(72930176) object(X)#1 (1) { ["y":"X":private]=> int(72930176) }
Output for 5.3.2
<pre>int(386755695) object(X)#1 (1) { ["y":"X":private]=> int(386755695) }
Output for 5.3.1
<pre>int(1403635674) object(X)#1 (1) { ["y":"X":private]=> int(1403635674) }
Output for 5.3.0
<pre>int(701673050) object(X)#1 (1) { ["y":"X":private]=> int(701673050) }
Output for 5.2.17
<pre>int(677111324) object(X)#1 (1) { ["y:private"]=> int(677111324) }
Output for 5.2.16
<pre>int(354569103) object(X)#1 (1) { ["y:private"]=> int(354569103) }
Output for 5.2.15
<pre>int(1386852251) object(X)#1 (1) { ["y:private"]=> int(1386852251) }
Output for 5.2.14
<pre>int(1708531395) object(X)#1 (1) { ["y:private"]=> int(1708531395) }
Output for 5.2.13
<pre>int(713001278) object(X)#1 (1) { ["y:private"]=> int(713001278) }
Output for 5.2.12
<pre>int(604037551) object(X)#1 (1) { ["y:private"]=> int(604037551) }
Output for 5.2.11
<pre>int(552674477) object(X)#1 (1) { ["y:private"]=> int(552674477) }
Output for 5.2.10
<pre>int(236696332) object(X)#1 (1) { ["y:private"]=> int(236696332) }
Output for 5.2.9
<pre>int(763839661) object(X)#1 (1) { ["y:private"]=> int(763839661) }
Output for 5.2.8
<pre>int(1195883602) object(X)#1 (1) { ["y:private"]=> int(1195883602) }
Output for 5.2.7
<pre>int(1214295083) object(X)#1 (1) { ["y:private"]=> int(1214295083) }
Output for 5.2.6
<pre>int(3258248) object(X)#1 (1) { ["y:private"]=> int(3258248) }
Output for 5.2.5
<pre>int(1971929691) object(X)#1 (1) { ["y:private"]=> int(1971929691) }
Output for 5.2.4
<pre>int(1723953326) object(X)#1 (1) { ["y:private"]=> int(1723953326) }
Output for 5.2.3
<pre>int(1428729981) object(X)#1 (1) { ["y:private"]=> int(1428729981) }
Output for 5.2.2
<pre>int(272079682) object(X)#1 (1) { ["y:private"]=> int(272079682) }
Output for 5.2.1
<pre>int(1721178091) object(X)#1 (1) { ["y:private"]=> int(1721178091) }
Output for 5.2.0
<pre>int(1705257183) object(X)#1 (1) { ["y:private"]=> int(1705257183) }
Output for 5.1.6
<pre>int(1685735795) object(X)#1 (1) { ["y:private"]=> int(1685735795) }
Output for 5.1.5
<pre>int(853024829) object(X)#1 (1) { ["y:private"]=> int(853024829) }
Output for 5.1.4
<pre>int(581998451) object(X)#1 (1) { ["y:private"]=> int(581998451) }
Output for 5.1.3
<pre>int(56347236) object(X)#1 (1) { ["y:private"]=> int(56347236) }
Output for 5.1.2
<pre>int(1847710170) object(X)#1 (1) { ["y:private"]=> int(1847710170) }
Output for 5.1.1
<pre>int(742313179) object(X)#1 (1) { ["y:private"]=> int(742313179) }
Output for 5.1.0
<pre>int(125462600) object(X)#1 (1) { ["y:private"]=> int(125462600) }
Output for 5.0.5
<pre>int(1667464887) object(X)#1 (1) { ["y:private"]=> int(1667464887) }
Output for 5.0.4
<pre>int(1220547682) object(X)#1 (1) { ["y:private"]=> int(1220547682) }
Output for 5.0.3
<pre>int(781600553) object(X)#1 (1) { ["y:private"]=> int(781600553) }
Output for 5.0.2
<pre>int(1025476920) object(X)#1 (1) { ["y:private"]=> int(1025476920) }
Output for 5.0.1
<pre>int(1795752903) object(X)#1 (1) { ["y:private"]=> int(1795752903) }
Output for 5.0.0
<pre>int(1277200323) object(X)#1 (1) { ["y:private"]=> int(1277200323) }
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/PDVFC on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/PDVFC on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/PDVFC on line 5
Process exited with code 255.