3v4l.org

run code in 300+ PHP versions simultaneously
<?php $times = 1000*100*10; $var = null; $var = 10; $var2 = '10'; $time1 = microtime(true); for ($i = 0; $i <= $times; $i++) { if ($var == $var2) {} } $time1 = microtime(true) - $time1; //echo "Time using '!': $time1\n"; $time2 = microtime(true); for ($i = 0; $i <= $times; $i++) { if ($var === $var2) {} } $time2 = microtime(true) - $time2; //echo "Time using '===': $time2\n"; if ($time1 > $time2){ $p = (($time1-$time2)/$time2) * 100; //printf("'===' was faster by %.2f percent.", $p); printf("'===' was faster"); } else { $p = (($time2-$time1)/$time1) * 100; //printf("'==' was faster by %.2f percent.", $p); printf("'==' was faster"); }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.4.10.0100.09916.43
7.4.00.0080.08315.54
7.3.130.0070.07016.33
7.3.120.0100.08615.50
7.3.110.0020.07315.39
7.3.100.0050.07715.70
7.3.90.0030.09115.55
7.3.80.0030.06115.60
7.3.70.0030.06315.49
7.3.60.0080.06515.37
7.3.50.0070.09515.56
7.3.40.0060.06315.56
7.3.30.0050.06615.43
7.3.20.0030.07017.24
7.3.10.0050.06217.36
7.3.00.0070.07617.40
7.2.260.0070.10716.57
7.2.250.0070.10615.92
7.2.240.0100.08215.83
7.2.230.0080.08215.61
7.2.220.0050.08215.76
7.2.210.0050.08115.71
7.2.200.0080.06515.83
7.2.190.0020.07715.75
7.2.180.0030.07115.77
7.2.170.0050.06815.75
7.2.160.0070.06116.57
7.2.150.0070.06018.47
7.2.140.0030.06518.36
7.2.130.0030.07018.38
7.2.120.0070.11018.40
7.2.110.0030.05918.52
7.2.100.0030.11118.29
7.2.90.0000.07818.34
7.2.80.0070.06318.33
7.2.70.0100.10618.23
7.2.60.0030.09918.25
7.2.50.0130.07518.21
7.2.40.0070.08218.41
7.2.30.0030.11118.34
7.2.20.0000.08718.31
7.2.10.0070.06418.30
7.2.00.0050.06118.80
7.1.330.0070.13316.51
7.1.320.0070.14616.40
7.1.310.0030.12916.58
7.1.300.0050.12916.67
7.1.290.0030.14416.40
7.1.280.0050.12716.62
7.1.270.0020.14816.34
7.1.260.0050.13116.62
7.1.250.0100.11417.25
7.1.240.0100.13217.22
7.1.230.0130.15817.18
7.1.220.0030.13317.29
7.1.210.0030.13317.42
7.1.200.0100.10817.26
7.1.190.0070.15817.33
7.1.180.0030.17217.26
7.1.170.0030.17217.42
7.1.160.0030.15417.26
7.1.150.0070.17117.19
7.1.140.0000.17917.17
7.1.130.0000.17617.49
7.1.120.0130.11917.22
7.1.110.0100.11717.27
7.1.100.0000.14317.34
7.1.90.0000.17617.31
7.1.80.0070.12217.23
7.1.70.0030.08717.23
7.1.60.0050.11518.25
7.1.50.0100.11617.08
7.1.40.0070.15817.27
7.1.30.0030.13017.26
7.1.20.0030.12417.40
7.1.10.0000.13017.29
7.1.00.0070.12319.84
7.0.330.0070.15316.87
7.0.320.0030.13417.13
7.0.310.0070.13717.09
7.0.300.0000.13417.08
7.0.290.0030.14316.89
7.0.280.0060.14717.12
7.0.270.0030.12717.05
7.0.260.0030.13517.05
7.0.250.0070.12017.04
7.0.240.0030.16517.03
7.0.230.0030.13217.09
7.0.220.0070.12516.95
7.0.210.0100.15716.89
7.0.200.0150.09316.91
7.0.190.0030.16917.12
7.0.180.0030.16617.07
7.0.170.0070.11017.08
7.0.160.0030.17217.13
7.0.150.0070.14317.01
7.0.140.0050.15319.51
7.0.130.0030.14416.96
7.0.120.0050.13919.47
7.0.110.0000.17217.07
7.0.100.0100.13116.99
7.0.90.0070.11517.04
7.0.80.0000.13016.91
7.0.70.0070.17016.63
7.0.60.0050.13618.51
7.0.50.0050.13217.38
7.0.40.0080.10817.56
7.0.30.0220.11717.65
7.0.20.0170.14317.53
7.0.10.0180.10117.55
7.0.00.0030.10817.61
5.6.400.0000.28816.00
5.6.390.0030.30215.92
5.6.380.0000.28316.16
5.6.370.0130.30815.95
5.6.360.0030.29415.49
5.6.350.0030.29815.92
5.6.340.0070.26315.99
5.6.330.0030.27616.00
5.6.320.0030.31816.07
5.6.310.0070.27315.50
5.6.300.0030.30315.84
5.6.290.0030.33815.85
5.6.280.0030.26118.38
5.6.270.0030.35315.61
5.6.260.0070.33716.15
5.6.250.0070.28015.85
5.6.240.0070.26615.81
5.6.230.0070.27215.77
5.6.220.0070.29615.62
5.6.210.0020.25718.30
5.6.200.0030.19516.93
5.6.190.0100.22718.15
5.6.180.0210.20918.18
5.6.170.0230.23318.11
5.6.160.0070.23818.13
5.6.150.0020.22217.00
5.6.140.0050.22416.93
5.6.130.0030.22016.86
5.6.120.0100.23418.40
5.6.110.0030.22018.42
5.6.100.0070.23118.33
5.6.90.0100.22318.45
5.6.80.0050.23118.00
5.6.70.0130.22017.98
5.6.60.0030.27715.87
5.6.50.0000.34715.61
5.6.40.0130.28315.52
5.6.30.0030.30315.72
5.6.20.0000.31915.77
5.6.10.0070.28415.71
5.6.00.0030.33515.73
5.5.380.0070.34716.00
5.5.370.0100.27015.78
5.5.360.0160.27815.64
5.5.350.0170.26217.98
5.5.340.0050.20716.90
5.5.330.0070.22617.97
5.5.320.0080.21518.08
5.5.310.0180.22917.95
5.5.300.0050.23816.94
5.5.290.0100.26316.71
5.5.280.0070.22918.46
5.5.270.0130.24518.41
5.5.260.0130.23718.42
5.5.250.0080.27518.20
5.5.240.0070.27817.92
5.5.230.0190.30815.41
5.5.220.0060.32015.53
5.5.210.0070.26715.66
5.5.200.0100.29915.59
5.5.190.0070.34315.77
5.5.180.0100.28815.68
5.5.170.0000.35415.63
5.5.160.0000.33715.91
5.5.150.0100.27315.63
5.5.140.0000.33815.73
5.5.130.0070.38815.79
5.5.120.0030.31015.89
5.5.110.0030.31515.63
5.5.100.0030.30615.67
5.5.90.0070.30815.76
5.5.80.0070.32015.48
5.5.70.0030.34815.57
5.5.60.0030.33015.68
5.5.50.0030.29215.77
5.5.40.0000.27915.43
5.5.30.0030.32415.79
5.5.20.0030.33015.80
5.5.10.0070.29315.70
5.5.00.0000.31915.73
5.4.450.0070.22915.88
5.4.440.0110.25115.94
5.4.430.0080.26315.93
5.4.420.0080.22115.73
5.4.410.0150.23215.71
5.4.400.0070.24015.77
5.4.390.0070.26415.80
5.4.380.0110.23015.68
5.4.370.0070.22615.63
5.4.360.0130.25415.89
5.4.350.0150.24215.66
5.4.340.0100.25015.61
5.4.330.0070.33012.28
5.4.320.0070.25315.83
5.4.310.0080.24715.74
5.4.300.0030.20915.58
5.4.290.0050.26215.56
5.4.280.0070.21715.72
5.4.270.0050.21815.85
5.4.260.0050.21015.85
5.4.250.0020.22215.78
5.4.240.0080.22615.87
5.4.230.0030.24515.70
5.4.220.0130.24815.77
5.4.210.0100.23615.50
5.4.200.0100.24315.82
5.4.190.0050.23515.51
5.4.180.0000.24115.80
5.4.170.0030.22715.71
5.4.160.0080.23215.68
5.4.150.0020.22515.74
5.4.140.0050.25614.47
5.4.130.0050.26714.25
5.4.120.0030.23914.42
5.4.110.0060.23314.29
5.4.100.0020.26014.41
5.4.90.0020.20914.35
5.4.80.0050.25314.39
5.4.70.0020.23814.32
5.4.60.0000.25514.37
5.4.50.0070.24414.42
5.4.40.0050.21014.35
5.4.30.0070.23914.37
5.4.20.0050.22614.33
5.4.10.0070.24514.26
5.4.00.0000.25914.04
5.3.290.0030.27713.82
5.3.280.0050.22413.65
5.3.270.0050.26613.73
5.3.260.0200.24413.78
5.3.250.0050.22913.80
5.3.240.0200.25713.64
5.3.230.0150.24213.75
5.3.220.0030.23713.59
5.3.210.0080.25913.69
5.3.200.0080.25913.65
5.3.190.0050.24613.69
5.3.180.0080.28613.78
5.3.170.0050.25613.70
5.3.160.0050.27613.73
5.3.150.0020.23113.68
5.3.140.0130.23313.80
5.3.130.0050.24313.69
5.3.120.0050.25113.72
5.3.110.0100.22513.69
5.3.100.0070.23913.40
5.3.90.0030.23013.58
5.3.80.0080.26913.34
5.3.70.0100.27713.35
5.3.60.0100.25513.36
5.3.50.0020.24613.36
5.3.40.0030.25013.39
5.3.30.0070.27913.32
5.3.20.0050.25013.22
5.3.10.0100.27113.19
5.3.00.0000.26113.15
5.2.170.0100.20711.08
5.2.160.0030.19011.00
5.2.150.0070.23011.30
5.2.140.0070.20011.04
5.2.130.0070.16711.09
5.2.120.0030.22310.98
5.2.110.0030.22711.09
5.2.100.0070.16711.03
5.2.90.0030.22311.09
5.2.80.0070.20310.93
5.2.70.0070.23311.07
5.2.60.0100.15710.93
5.2.50.0070.21310.89
5.2.40.0030.17710.93
5.2.30.0030.16710.93
5.2.20.0030.18310.85
5.2.10.0000.18010.86
5.2.00.0000.22310.71
5.1.60.0000.2139.98
5.1.50.0070.21310.00
5.1.40.0000.2109.88
5.1.30.0000.22310.29
5.1.20.0070.22010.34
5.1.10.0070.2039.96
5.1.00.0070.20010.03
5.0.50.0370.4309.46
5.0.40.0030.4509.46
5.0.30.0000.4509.46
5.0.20.0030.3539.46
5.0.10.0030.3379.46
5.0.00.0070.3539.46
4.4.90.0100.4079.46
4.4.80.0030.3579.46
4.4.70.0030.4109.46
4.4.60.0030.3839.46
4.4.50.0100.4109.46
4.4.40.0000.4279.46
4.4.30.0070.3509.46
4.4.20.0270.3939.46
4.4.10.0570.3439.46
4.4.00.0000.3809.46
4.3.110.0030.3939.46
4.3.100.0000.3509.46
4.3.90.0000.3309.46
4.3.80.0000.4009.46
4.3.70.0030.3309.46
4.3.60.0070.3379.46
4.3.50.0030.3579.46
4.3.40.0000.4209.46
4.3.30.0000.3379.46
4.3.20.0000.3339.46
4.3.10.0030.3639.46
4.3.00.0030.3979.46

preferences:
32.82 ms | 401 KiB | 5 Q