3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class NonExistant { protected $associativeArray = array( 'one' => 'one', 'two' => 'two', 'three' => 'three', 'four' => 'four', 'five' => 'five', 'six' => 'six', ); protected $numIterations = 1000; public function issetTest() { for ($i = 0; $i < $this->numIterations; $i++) { isset($this->associativeArray['none']); } } public function arrayKeyExistsTest() { for ($i = 0; $i < $this->numIterations; $i++) { array_key_exists('none', $this->associativeArray); } } } $class = new NonExistant(); foreach (array('issetTest', 'arrayKeyExistsTest') as $func) { $time_start = microtime(); $class->$func(); $time_end = microtime(); $time = $time_end - $time_start; echo "Did $func in $time seconds\n"; }
Output for 7.1.0
Notice: A non well formed numeric value encountered in /in/hPpbU on line 36 Notice: A non well formed numeric value encountered in /in/hPpbU on line 36 Did issetTest in 5.9E-5 seconds Notice: A non well formed numeric value encountered in /in/hPpbU on line 36 Notice: A non well formed numeric value encountered in /in/hPpbU on line 36 Did arrayKeyExistsTest in 9.5E-5 seconds
Output for 7.0.14
Did issetTest in 7.5E-5 seconds Did arrayKeyExistsTest in 6.5E-5 seconds
Output for 7.0.6
Did issetTest in 4.9999999999994E-5 seconds Did arrayKeyExistsTest in 5.9000000000031E-5 seconds
Output for 7.0.5
Did issetTest in 5.1000000000023E-5 seconds Did arrayKeyExistsTest in 5.899999999992E-5 seconds
Output for 7.0.4
Did issetTest in 3.3000000000061E-5 seconds Did arrayKeyExistsTest in 3.7999999999982E-5 seconds
Output for 7.0.3
Did issetTest in 4.1999999999986E-5 seconds Did arrayKeyExistsTest in 5.1000000000023E-5 seconds
Output for 7.0.2
Did issetTest in 4.8000000000003E-5 seconds Did arrayKeyExistsTest in 5.6999999999998E-5 seconds
Output for 7.0.1
Did issetTest in 5.3999999999998E-5 seconds Did arrayKeyExistsTest in 7.5000000000047E-5 seconds
Output for 7.0.0
Did issetTest in 3.5000000000007E-5 seconds Did arrayKeyExistsTest in 3.6999999999981E-5 seconds
Output for hhvm-3.12.0
Did issetTest in 0.00013299999999999 seconds Did arrayKeyExistsTest in 0.00014900000000001 seconds
Output for hhvm-3.10.0
Did issetTest in 0.000166 seconds Did arrayKeyExistsTest in 0.00017600000000001 seconds
Output for 5.6.28
Did issetTest in 0.000133 seconds Did arrayKeyExistsTest in 0.00026 seconds
Output for 5.6.21
Did issetTest in 9.0999999999952E-5 seconds Did arrayKeyExistsTest in 0.00019900000000006 seconds
Output for 5.6.20
Did issetTest in 0.00011999999999998 seconds Did arrayKeyExistsTest in 0.000223 seconds
Output for 5.6.19
Did issetTest in 8.7000000000059E-5 seconds Did arrayKeyExistsTest in 0.00019900000000006 seconds
Output for 5.6.18
Did issetTest in 6.4000000000008E-5 seconds Did arrayKeyExistsTest in 0.000139 seconds
Output for 5.6.17
Did issetTest in 9.7000000000014E-5 seconds Did arrayKeyExistsTest in 0.00023699999999993 seconds
Output for 5.6.16
Did issetTest in 7.4000000000018E-5 seconds Did arrayKeyExistsTest in 0.00015299999999996 seconds
Output for 5.6.15
Did issetTest in 7.0000000000014E-5 seconds Did arrayKeyExistsTest in 0.00015000000000004 seconds
Output for 5.6.14
Did issetTest in 0.00010399999999999 seconds Did arrayKeyExistsTest in 0.000219 seconds
Output for 5.6.13
Did issetTest in 7.4999999999992E-5 seconds Did arrayKeyExistsTest in 0.00016300000000002 seconds
Output for 5.6.12
Did issetTest in 7.6999999999994E-5 seconds Did arrayKeyExistsTest in 0.00016099999999997 seconds
Output for 5.6.11
Did issetTest in 8.9000000000006E-5 seconds Did arrayKeyExistsTest in 0.000194 seconds
Output for 5.6.10
Did issetTest in 6.0000000000004E-5 seconds Did arrayKeyExistsTest in 0.00012800000000002 seconds
Output for 5.6.9
Did issetTest in 9.5999999999985E-5 seconds Did arrayKeyExistsTest in 0.00020999999999999 seconds
Output for 5.6.8
Did issetTest in 8.4000000000001E-5 seconds Did arrayKeyExistsTest in 0.000179 seconds
Output for 5.5.35
Did issetTest in 0.00010199999999994 seconds Did arrayKeyExistsTest in 0.00022100000000003 seconds
Output for 5.5.34
Did issetTest in 9.4000000000038E-5 seconds Did arrayKeyExistsTest in 0.000199 seconds
Output for 5.5.33
Did issetTest in 9.5000000000067E-5 seconds Did arrayKeyExistsTest in 0.00021400000000005 seconds
Output for 5.5.32
Did issetTest in 0.00011 seconds Did arrayKeyExistsTest in 0.00025 seconds
Output for 5.5.31
Did issetTest in 0.00011800000000006 seconds Did arrayKeyExistsTest in 0.00022800000000001 seconds
Output for 5.5.30
Did issetTest in 8.3999999999973E-5 seconds Did arrayKeyExistsTest in 0.00018400000000002 seconds
Output for 5.5.29
Did issetTest in 9.0000000000034E-5 seconds Did arrayKeyExistsTest in 0.00019900000000006 seconds
Output for 5.5.28
Did issetTest in 9.9000000000071E-5 seconds Did arrayKeyExistsTest in 0.00021700000000002 seconds
Output for 5.5.27
Did issetTest in 9.5000000000012E-5 seconds Did arrayKeyExistsTest in 0.000193 seconds
Output for 5.5.26
Did issetTest in 0.00010200000000005 seconds Did arrayKeyExistsTest in 0.00022699999999998 seconds
Output for 5.5.25
Did issetTest in 6.4000000000002E-5 seconds Did arrayKeyExistsTest in 0.000139 seconds
Output for 5.5.24
Did issetTest in 9.300000000001E-5 seconds Did arrayKeyExistsTest in 0.00021499999999997 seconds
Output for 5.4.45
Did issetTest in 0.00010399999999999 seconds Did arrayKeyExistsTest in 0.000224 seconds
Output for 5.4.44
Did issetTest in 0.00011000000000005 seconds Did arrayKeyExistsTest in 0.00026500000000002 seconds
Output for 5.4.43
Did issetTest in 9.7000000000014E-5 seconds Did arrayKeyExistsTest in 0.00019399999999992 seconds
Output for 5.4.42
Did issetTest in 9.5999999999985E-5 seconds Did arrayKeyExistsTest in 0.00026599999999999 seconds
Output for 5.4.41
Did issetTest in 0.00010700000000008 seconds Did arrayKeyExistsTest in 0.00023399999999996 seconds
Output for 5.4.40
Did issetTest in 0.00011 seconds Did arrayKeyExistsTest in 0.00022 seconds
Output for 5.4.39
Did issetTest in 0.00010299999999996 seconds Did arrayKeyExistsTest in 0.000197 seconds
Output for 5.4.38
Did issetTest in 0.00013800000000008 seconds Did arrayKeyExistsTest in 0.00028900000000009 seconds
Output for 5.4.37
Did issetTest in 0.00014599999999998 seconds Did arrayKeyExistsTest in 0.00036499999999995 seconds
Output for 5.4.36
Did issetTest in 0.00015500000000002 seconds Did arrayKeyExistsTest in 0.004124 seconds
Output for 5.4.35
Did issetTest in 0.000137 seconds Did arrayKeyExistsTest in 0.00022799999999999 seconds
Output for 5.4.34
Did issetTest in 0.00015799999999999 seconds Did arrayKeyExistsTest in 0.000278 seconds
Output for 5.4.32
Did issetTest in 0.000115 seconds Did arrayKeyExistsTest in 0.00017 seconds
Output for 5.4.31
Did issetTest in 0.000108 seconds Did arrayKeyExistsTest in 0.00018299999999999 seconds
Output for 5.4.30
Did issetTest in 0.000148 seconds Did arrayKeyExistsTest in 0.000179 seconds
Output for 5.4.29
Did issetTest in 0.00010000000000002 seconds Did arrayKeyExistsTest in 0.00018800000000002 seconds
Output for 5.4.28
Did issetTest in 9.8999999999988E-5 seconds Did arrayKeyExistsTest in 0.00017 seconds
Output for 5.4.27
Did issetTest in 0.00013099999999999 seconds Did arrayKeyExistsTest in 0.00018600000000002 seconds
Output for 5.4.26
Did issetTest in 0.00011 seconds Did arrayKeyExistsTest in 0.00019999999999998 seconds
Output for 5.4.3, 5.4.25
Did issetTest in 0.00010599999999999 seconds Did arrayKeyExistsTest in 0.000195 seconds
Output for 5.4.24
Did issetTest in 9.8000000000042E-5 seconds Did arrayKeyExistsTest in 0.00017499999999998 seconds
Output for 5.4.23
Did issetTest in 0.00011900000000004 seconds Did arrayKeyExistsTest in 0.00018800000000002 seconds
Output for 5.4.22
Did issetTest in 0.000112 seconds Did arrayKeyExistsTest in 0.00021300000000002 seconds
Output for 5.4.21
Did issetTest in 9.9999999999989E-5 seconds Did arrayKeyExistsTest in 0.00020500000000001 seconds
Output for 5.4.20
Did issetTest in 0.000108 seconds Did arrayKeyExistsTest in 0.00021799999999994 seconds
Output for 5.4.19
Did issetTest in 0.00014500000000006 seconds Did arrayKeyExistsTest in 0.00023799999999996 seconds
Output for 5.4.18
Did issetTest in 0.00011499999999998 seconds Did arrayKeyExistsTest in 0.00025699999999995 seconds
Output for 5.4.17
Did issetTest in 9.9999999999989E-5 seconds Did arrayKeyExistsTest in 0.00020300000000006 seconds
Output for 5.4.16
Did issetTest in 0.00010500000000002 seconds Did arrayKeyExistsTest in 0.00022800000000001 seconds
Output for 5.4.15
Did issetTest in 0.000108 seconds Did arrayKeyExistsTest in 0.00017100000000003 seconds
Output for 5.4.14
Did issetTest in 9.7999999999931E-5 seconds Did arrayKeyExistsTest in 0.00017299999999998 seconds
Output for 5.4.13
Did issetTest in 9.4000000000038E-5 seconds Did arrayKeyExistsTest in 0.00021499999999997 seconds
Output for 5.4.12
Did issetTest in 0.0001230000000001 seconds Did arrayKeyExistsTest in 0.000247 seconds
Output for 5.4.11
Did issetTest in 0.000176 seconds Did arrayKeyExistsTest in 0.000299 seconds
Output for 5.4.10
Did issetTest in 0.000117 seconds Did arrayKeyExistsTest in 0.000219 seconds
Output for 5.4.9
Did issetTest in 0.000109 seconds Did arrayKeyExistsTest in 0.00018399999999999 seconds
Output for 5.4.8
Did issetTest in 0.000111 seconds Did arrayKeyExistsTest in 0.00018000000000001 seconds
Output for 5.4.7
Did issetTest in 0.00011900000000001 seconds Did arrayKeyExistsTest in 0.00020399999999998 seconds
Output for 5.4.6
Did issetTest in 0.000115 seconds Did arrayKeyExistsTest in 0.00018500000000002 seconds
Output for 5.4.5
Did issetTest in 0.00010399999999999 seconds Did arrayKeyExistsTest in 0.00017600000000001 seconds
Output for 5.4.4
Did issetTest in 0.00010000000000004 seconds Did arrayKeyExistsTest in 0.00017799999999996 seconds
Output for 5.4.2
Did issetTest in 0.000108 seconds Did arrayKeyExistsTest in 0.00019400000000003 seconds
Output for 5.4.1
Did issetTest in 9.7000000000014E-5 seconds Did arrayKeyExistsTest in 0.000195 seconds
Output for 5.4.0
Did issetTest in 9.7000000000014E-5 seconds Did arrayKeyExistsTest in 0.00017800000000001 seconds
Output for 5.3.29
Did issetTest in 0.000193 seconds Did arrayKeyExistsTest in 0.00026899999999996 seconds
Output for 5.3.28
Did issetTest in 0.00021199999999999 seconds Did arrayKeyExistsTest in 0.00029100000000004 seconds
Output for 5.3.27
Did issetTest in 0.0002089999999999 seconds Did arrayKeyExistsTest in 0.00033099999999997 seconds
Output for 5.3.26
Did issetTest in 0.00024200000000008 seconds Did arrayKeyExistsTest in 0.00028299999999992 seconds
Output for 5.3.25
Did issetTest in 0.00020300000000006 seconds Did arrayKeyExistsTest in 0.00026799999999993 seconds
Output for 5.3.24
Did issetTest in 0.00020799999999999 seconds Did arrayKeyExistsTest in 0.00028499999999998 seconds
Output for 5.3.23
Did issetTest in 0.00021399999999994 seconds Did arrayKeyExistsTest in 0.00034599999999996 seconds
Output for 5.3.22
Did issetTest in 0.00042900000000001 seconds Did arrayKeyExistsTest in 0.00030799999999997 seconds
Output for 5.3.21
Did issetTest in 0.00019899999999995 seconds Did arrayKeyExistsTest in 0.00029800000000002 seconds
Output for 5.3.20
Did issetTest in 0.000238 seconds Did arrayKeyExistsTest in 0.000312 seconds
Output for 5.3.19
Did issetTest in 0.000246 seconds Did arrayKeyExistsTest in 0.000319 seconds
Output for 5.3.18
Did issetTest in 0.000195 seconds Did arrayKeyExistsTest in 0.00028400000000001 seconds
Output for 5.3.17
Did issetTest in 0.000246 seconds Did arrayKeyExistsTest in 0.00035199999999999 seconds
Output for 5.3.16
Did issetTest in 0.00023699999999999 seconds Did arrayKeyExistsTest in 0.00034200000000001 seconds
Output for 5.3.15
Did issetTest in 0.00022300000000003 seconds Did arrayKeyExistsTest in 0.000637 seconds
Output for 5.3.14
Did issetTest in 0.00024099999999999 seconds Did arrayKeyExistsTest in 0.00031199999999998 seconds
Output for 5.3.13
Did issetTest in 0.00019600000000003 seconds Did arrayKeyExistsTest in 0.00027700000000003 seconds
Output for 5.3.12
Did issetTest in 0.00021099999999996 seconds Did arrayKeyExistsTest in 0.000278 seconds
Output for 5.3.11
Did issetTest in 0.00022700000000003 seconds Did arrayKeyExistsTest in 0.000278 seconds
Output for 5.3.10
Did issetTest in 0.00033099999999997 seconds Did arrayKeyExistsTest in 0.00053999999999998 seconds
Output for 5.3.9
Did issetTest in 0.00019999999999998 seconds Did arrayKeyExistsTest in 0.00026899999999996 seconds
Output for 5.3.8
Did issetTest in 0.00019599999999997 seconds Did arrayKeyExistsTest in 0.0003209999999999 seconds
Output for 5.3.7
Did issetTest in 0.00020999999999993 seconds Did arrayKeyExistsTest in 0.00035799999999997 seconds
Output for 5.3.6
Did issetTest in 0.000197 seconds Did arrayKeyExistsTest in 0.00029500000000005 seconds
Output for 5.3.5
Did issetTest in 0.00020999999999993 seconds Did arrayKeyExistsTest in 0.00030300000000005 seconds
Output for 5.3.4
Did issetTest in 0.00024600000000008 seconds Did arrayKeyExistsTest in 0.00037599999999993 seconds
Output for 5.3.3
Did issetTest in 0.00018700000000005 seconds Did arrayKeyExistsTest in 0.00029400000000002 seconds
Output for 5.3.2
Did issetTest in 0.00032699999999997 seconds Did arrayKeyExistsTest in 0.00058400000000003 seconds
Output for 5.3.1
Did issetTest in 0.00022300000000008 seconds Did arrayKeyExistsTest in 0.0003669999999999 seconds
Output for 5.3.0
Did issetTest in 0.00034400000000001 seconds Did arrayKeyExistsTest in 0.00058400000000003 seconds
Output for 5.2.17
Did issetTest in 0.00034500000000001 seconds Did arrayKeyExistsTest in 0.000554 seconds
Output for 5.2.16
Did issetTest in 0.000398 seconds Did arrayKeyExistsTest in 0.000495 seconds
Output for 5.2.15
Did issetTest in 0.00022800000000001 seconds Did arrayKeyExistsTest in 0.00029799999999999 seconds
Output for 5.2.14
Did issetTest in 0.000245 seconds Did arrayKeyExistsTest in 0.00027500000000003 seconds
Output for 5.2.13
Did issetTest in 0.00022999999999998 seconds Did arrayKeyExistsTest in 0.00034200000000001 seconds
Output for 5.2.12
Did issetTest in 0.00023100000000004 seconds Did arrayKeyExistsTest in 0.000278 seconds
Output for 5.2.11
Did issetTest in 0.00025199999999997 seconds Did arrayKeyExistsTest in 0.000309 seconds
Output for 5.2.10
Did issetTest in 0.00020399999999998 seconds Did arrayKeyExistsTest in 0.00031000000000003 seconds
Output for 5.2.9
Did issetTest in 0.000251 seconds Did arrayKeyExistsTest in 0.00035199999999996 seconds
Output for 5.2.8
Did issetTest in 0.00020900000000001 seconds Did arrayKeyExistsTest in 0.00036599999999998 seconds
Output for 5.2.7
Did issetTest in 0.000222 seconds Did arrayKeyExistsTest in 0.00034199999999995 seconds
Output for 5.2.6
Did issetTest in 0.00023600000000001 seconds Did arrayKeyExistsTest in 0.000307 seconds
Output for 5.2.5
Did issetTest in 0.00024500000000005 seconds Did arrayKeyExistsTest in 0.00040399999999996 seconds
Output for 5.2.4
Did issetTest in 0.00021300000000002 seconds Did arrayKeyExistsTest in 0.00038800000000005 seconds
Output for 5.2.3
Did issetTest in 0.00021499999999997 seconds Did arrayKeyExistsTest in 0.00075400000000003 seconds
Output for 5.2.2
Did issetTest in 0.00037100000000001 seconds Did arrayKeyExistsTest in 0.000552 seconds
Output for 5.2.1
Did issetTest in 0.00025399999999998 seconds Did arrayKeyExistsTest in 0.00039299999999998 seconds
Output for 5.2.0
Did issetTest in 0.00021199999999999 seconds Did arrayKeyExistsTest in 0.00036000000000003 seconds
Output for 5.1.6
Did issetTest in 0.00023200000000001 seconds Did arrayKeyExistsTest in 0.00036200000000008 seconds
Output for 5.1.5
Did issetTest in 0.00026499999999996 seconds Did arrayKeyExistsTest in 0.00033499999999997 seconds
Output for 5.1.4
Did issetTest in 0.00062700000000004 seconds Did arrayKeyExistsTest in 0.00057399999999996 seconds
Output for 5.1.3
Did issetTest in 0.00035600000000002 seconds Did arrayKeyExistsTest in 0.00049999999999994 seconds
Output for 5.1.2
Did issetTest in 0.00036599999999998 seconds Did arrayKeyExistsTest in 0.00058999999999998 seconds
Output for 5.1.1
Did issetTest in 0.00033000000000005 seconds Did arrayKeyExistsTest in 0.00063999999999997 seconds
Output for 5.1.0
Did issetTest in 0.000363 seconds Did arrayKeyExistsTest in 0.000549 seconds
Output for 5.0.5
Did issetTest in 0.007474 seconds Did arrayKeyExistsTest in 0.00067900000000001 seconds
Output for 5.0.4
Did issetTest in 0.00045200000000001 seconds Did arrayKeyExistsTest in 0.001263 seconds
Output for 5.0.3
Did issetTest in 0.00023899999999999 seconds Did arrayKeyExistsTest in 0.00039500000000001 seconds
Output for 5.0.2
Did issetTest in 0.00026600000000004 seconds Did arrayKeyExistsTest in 0.00039299999999998 seconds
Output for 5.0.1
Did issetTest in 0.00027899999999997 seconds Did arrayKeyExistsTest in 0.000417 seconds
Output for 5.0.0
Did issetTest in 0.00023500000000004 seconds Did arrayKeyExistsTest in 0.00041400000000003 seconds
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/hPpbU on line 4
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/hPpbU on line 4
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/hPpbU on line 4
Process exited with code 255.