3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $times = 10000; $var = null; $var = new stdClass(); $time1 = microtime(true); for ($i = 0; $i <= $times; $i++) { if (!$var) {} } $time1 = microtime(true) - $time1; //echo "Time using '!': $time1\n"; $time2 = microtime(true); for ($i = 0; $i <= $times; $i++) { if ($var === null) {} } $time2 = microtime(true) - $time2; //echo "Time using '===': $time2\n"; if ($time1 > $time2){ $p = (($time1-$time2)/$time2) * 100; printf("'===' was faster by %.2f percent.", $p); } else { $p = (($time2-$time1)/$time1) * 100; printf("'!' was faster by %.2f percent.", $p); }
Output for 7.1.0
'===' was faster by 58.60 percent.
Output for 7.0.14
'===' was faster by 56.63 percent.
Output for 7.0.12
'===' was faster by 71.06 percent.
Output for 7.0.6
'===' was faster by 61.68 percent.
Output for 7.0.5
'===' was faster by 66.27 percent.
Output for 5.5.24, 7.0.4
'===' was faster by 71.10 percent.
Output for 7.0.3
'===' was faster by 67.40 percent.
Output for 7.0.2
'===' was faster by 73.37 percent.
Output for 7.0.1
'===' was faster by 68.13 percent.
Output for 7.0.0
'===' was faster by 46.61 percent.
Output for 5.6.28
'===' was faster by 80.42 percent.
Output for 5.6.21
'===' was faster by 71.71 percent.
Output for 5.6.20
'===' was faster by 72.93 percent.
Output for 5.6.19
'===' was faster by 183.16 percent.
Output for 5.6.18
'===' was faster by 70.63 percent.
Output for 5.6.17
'===' was faster by 71.52 percent.
Output for 5.6.16
'===' was faster by 73.02 percent.
Output for 5.6.15
'===' was faster by 93.66 percent.
Output for 5.6.14
'===' was faster by 95.68 percent.
Output for 5.6.13
'===' was faster by 39.47 percent.
Output for 5.6.12
'===' was faster by 71.11 percent.
Output for 5.6.11
'===' was faster by 117.89 percent.
Output for 5.6.10
'===' was faster by 54.30 percent.
Output for 5.6.9
'===' was faster by 73.88 percent.
Output for 5.6.8
'===' was faster by 120.49 percent.
Output for 5.6.7
'===' was faster by 71.12 percent.
Output for 5.5.35
'===' was faster by 104.89 percent.
Output for 5.5.34
'===' was faster by 73.87 percent.
Output for 5.5.33
'===' was faster by 77.07 percent.
Output for 5.5.32
'===' was faster by 71.30 percent.
Output for 5.5.31
'===' was faster by 77.14 percent.
Output for 5.5.30
'===' was faster by 63.50 percent.
Output for 5.5.29
'===' was faster by 78.21 percent.
Output for 5.5.28
'===' was faster by 67.58 percent.
Output for 5.4.0, 5.5.27
'===' was faster by 63.91 percent.
Output for 5.5.26
'===' was faster by 70.50 percent.
Output for 5.5.25
'===' was faster by 76.34 percent.
Output for 5.4.45
'===' was faster by 65.12 percent.
Output for 5.4.44
'===' was faster by 65.02 percent.
Output for 5.4.43
'===' was faster by 69.81 percent.
Output for 5.4.42
'===' was faster by 63.13 percent.
Output for 5.4.41
'===' was faster by 157.25 percent.
Output for 5.4.40
'===' was faster by 55.72 percent.
Output for 5.4.39
'===' was faster by 83.02 percent.
Output for 5.4.38
'===' was faster by 58.14 percent.
Output for 5.4.37
'===' was faster by 92.53 percent.
Output for 5.4.36
'===' was faster by 65.62 percent.
Output for 5.4.35
'===' was faster by 68.84 percent.
Output for 5.4.34
'===' was faster by 64.38 percent.
Output for 5.4.32
'===' was faster by 73.23 percent.
Output for 5.4.31
'===' was faster by 79.83 percent.
Output for 5.4.30
'===' was faster by 67.90 percent.
Output for 5.4.29
'===' was faster by 69.43 percent.
Output for 5.4.28
'===' was faster by 70.12 percent.
Output for 5.3.5, 5.4.27
'===' was faster by 49.64 percent.
Output for 5.4.26
'===' was faster by 110.74 percent.
Output for 5.4.25
'===' was faster by 68.40 percent.
Output for 5.4.24
'===' was faster by 65.91 percent.
Output for 5.4.23
'===' was faster by 65.76 percent.
Output for 5.4.22
'===' was faster by 66.07 percent.
Output for 5.4.21
'===' was faster by 65.89 percent.
Output for 5.4.20
'===' was faster by 68.34 percent.
Output for 5.4.19
'===' was faster by 82.12 percent.
Output for 5.4.18
'===' was faster by 70.48 percent.
Output for 5.4.17
'===' was faster by 60.18 percent.
Output for 5.4.16
'===' was faster by 73.35 percent.
Output for 5.4.15
'===' was faster by 64.93 percent.
Output for 5.4.14
'===' was faster by 63.38 percent.
Output for 5.4.13
'===' was faster by 63.39 percent.
Output for 5.4.12
'===' was faster by 60.09 percent.
Output for 5.4.11
'===' was faster by 75.04 percent.
Output for 5.4.10
'===' was faster by 66.50 percent.
Output for 5.4.9
'===' was faster by 59.59 percent.
Output for 5.4.8
'===' was faster by 56.24 percent.
Output for 5.4.7
'===' was faster by 73.04 percent.
Output for 5.4.6
'===' was faster by 60.77 percent.
Output for 5.4.5
'===' was faster by 65.32 percent.
Output for 5.4.4
'===' was faster by 66.33 percent.
Output for 5.4.3
'===' was faster by 73.81 percent.
Output for 5.4.2
'===' was faster by 67.48 percent.
Output for 5.4.1
'===' was faster by 68.41 percent.
Output for 5.3.29
'===' was faster by 46.44 percent.
Output for 5.3.28
'===' was faster by 36.91 percent.
Output for 5.3.27
'===' was faster by 33.57 percent.
Output for 5.3.26
'===' was faster by 45.44 percent.
Output for 5.3.25
'===' was faster by 49.00 percent.
Output for 5.3.24
'===' was faster by 48.36 percent.
Output for 5.3.23
'===' was faster by 47.31 percent.
Output for 5.3.22
'===' was faster by 52.04 percent.
Output for 5.3.21
'===' was faster by 42.05 percent.
Output for 5.3.12, 5.3.20
'===' was faster by 43.67 percent.
Output for 5.3.19
'===' was faster by 71.34 percent.
Output for 5.3.18
'===' was faster by 116.75 percent.
Output for 5.3.17
'===' was faster by 53.36 percent.
Output for 5.3.16
'===' was faster by 53.52 percent.
Output for 5.3.15
'===' was faster by 45.07 percent.
Output for 5.3.14
'===' was faster by 42.72 percent.
Output for 5.3.13
'===' was faster by 51.22 percent.
Output for 5.3.11
'===' was faster by 59.61 percent.
Output for 5.3.10
'===' was faster by 48.13 percent.
Output for 5.3.9
'===' was faster by 50.06 percent.
Output for 5.3.8
'===' was faster by 52.85 percent.
Output for 5.3.7
'===' was faster by 52.43 percent.
Output for 5.3.6
'===' was faster by 56.77 percent.
Output for 5.3.4
'===' was faster by 44.27 percent.
Output for 5.3.3
'===' was faster by 45.84 percent.
Output for 5.3.2
'===' was faster by 46.43 percent.
Output for 5.3.1
'===' was faster by 53.01 percent.
Output for 5.3.0
'===' was faster by 46.27 percent.
Output for 5.2.17
'===' was faster by 34.10 percent.
Output for 5.2.16
'===' was faster by 33.06 percent.
Output for 5.2.15
'===' was faster by 34.50 percent.
Output for 5.2.14
'===' was faster by 36.35 percent.
Output for 5.2.13
'===' was faster by 33.03 percent.
Output for 5.2.12
'===' was faster by 41.07 percent.
Output for 5.2.11
'===' was faster by 43.81 percent.
Output for 5.2.10
'===' was faster by 31.55 percent.
Output for 5.2.9
'===' was faster by 35.40 percent.
Output for 5.2.8
'===' was faster by 34.46 percent.
Output for 5.2.7
'===' was faster by 5.07 percent.
Output for 5.2.6
'===' was faster by 31.69 percent.
Output for 5.2.5
'===' was faster by 40.63 percent.
Output for 5.2.4
'===' was faster by 39.28 percent.
Output for 5.2.3
'===' was faster by 35.49 percent.
Output for 5.2.2
'===' was faster by 33.11 percent.
Output for 5.2.1
'===' was faster by 36.47 percent.
Output for 5.2.0
'===' was faster by 33.84 percent.
Output for 5.1.6
'===' was faster by 33.94 percent.
Output for 5.1.5
'===' was faster by 43.90 percent.
Output for 5.1.4
'===' was faster by 47.17 percent.
Output for 5.1.3
'===' was faster by 29.23 percent.
Output for 5.1.2
'===' was faster by 2.05 percent.
Output for 5.1.1
'!' was faster by 3.56 percent.
Output for 5.1.0
'===' was faster by 3.25 percent.
Output for 5.0.5
'!' was faster by 6.46 percent.
Output for 5.0.4
'!' was faster by 5.94 percent.
Output for 5.0.3
'!' was faster by 5.73 percent.
Output for 5.0.2
'===' was faster by 1.70 percent.
Output for 5.0.1
'!' was faster by 4.22 percent.
Output for 5.0.0
'===' was faster by 14.30 percent.
Output for 4.4.9
'!' was faster by 5.76 percent.
Output for 4.4.8
'!' was faster by 9.03 percent.
Output for 4.4.7
'!' was faster by 5.15 percent.
Output for 4.4.6
'!' was faster by 5.20 percent.
Output for 4.4.5
'!' was faster by 5.24 percent.
Output for 4.4.4
'!' was faster by 8.35 percent.
Output for 4.4.3
'!' was faster by 6.29 percent.
Output for 4.4.2
'!' was faster by 6.59 percent.
Output for 4.4.1
'!' was faster by 6.68 percent.
Output for 4.4.0
'!' was faster by 56.33 percent.
Output for 4.3.11
'!' was faster by 4.52 percent.
Output for 4.3.10
'!' was faster by 6.91 percent.
Output for 4.3.9
'!' was faster by 44.92 percent.
Output for 4.3.8
'!' was faster by 4.55 percent.
Output for 4.3.7
'!' was faster by 4.64 percent.
Output for 4.3.6
'!' was faster by 4.20 percent.
Output for 4.3.5
'!' was faster by 9.27 percent.
Output for 4.3.4
'!' was faster by 9.52 percent.
Output for 4.3.3
'!' was faster by 76.69 percent.
Output for 4.3.2
'!' was faster by 1.82 percent.
Output for 4.3.1
'!' was faster by 5.81 percent.
Output for 4.3.0
'!' was faster by 0.74 percent.