3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function foo() { $start = microtime(true); for ($i=0; $i<1e5; $i++) { $a=get_called_class(); } $end = microtime(true); echo "Took: ", ($end-$start)*1e3, " ms"; $start = microtime(true); for ($i=0; $i<1e5; $i++) { $a=static::class; } $end = microtime(true); echo "Took: ", ($end-$start)*1e3, " ms"; } }

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.2.00.0060.00619.13
7.1.70.0030.00317.09
7.1.60.0070.01819.40
7.1.50.0180.00716.83
7.1.00.0070.07322.54
7.0.200.0030.00316.74
7.0.140.0100.07022.00
7.0.60.0030.06019.83
7.0.50.0070.05717.89
7.0.40.0100.06020.30
7.0.30.0600.06720.24
7.0.20.0300.08020.15
7.0.10.0100.06320.09
7.0.00.0070.04320.04
5.6.280.0000.07720.93
5.6.210.0130.08320.56
5.6.200.0070.04018.18
5.6.190.0030.07020.46
5.6.180.0300.07720.48
5.6.170.0300.07320.45
5.6.160.0070.08020.57
5.6.150.0070.04718.29
5.6.140.0100.07718.27
5.6.130.0170.08018.17
5.6.120.0130.08020.90
5.6.110.0130.08020.96
5.6.100.0070.05721.03
5.6.90.0070.08721.10
5.6.80.0130.05720.36
5.5.350.0000.04720.32
5.5.340.0030.04717.92
5.5.330.0070.05320.43
5.5.320.0470.07020.35
5.5.310.0270.07720.35
5.5.300.0030.06017.94
5.5.290.0030.08318.08
5.5.280.0070.08020.73
5.5.270.0070.06020.65
5.5.260.0030.04320.87
5.5.250.0070.05020.79
5.5.240.4000.04020.28
5.4.450.0230.07019.46
5.4.440.0130.06019.40
5.4.430.0100.05719.38
5.4.420.0170.05019.47
5.4.410.0230.04719.26
5.4.400.0270.06718.83
5.4.390.0300.06319.23
5.4.380.0170.05318.61
5.4.370.0100.05718.78
5.4.360.0230.04318.78
5.4.350.0200.05018.79
5.4.340.0200.05318.75
5.4.320.0030.03812.51
5.4.310.0050.04512.51
5.4.300.0060.04712.51
5.4.290.0060.03712.51
5.4.280.0060.03412.41
5.4.270.0080.03412.41
5.4.260.0050.03812.41
5.4.250.0060.03712.41
5.4.240.0090.03312.41
5.4.230.0060.03712.40
5.4.220.0070.03412.40
5.4.210.0060.03512.40
5.4.200.0030.03912.40
5.4.190.0040.03612.39
5.4.180.0030.03812.40
5.4.170.0070.03412.40
5.4.160.0050.03612.40
5.4.150.0080.03312.39
5.4.140.0070.03412.09
5.4.130.0050.03512.07
5.4.120.0060.03412.03
5.4.110.0100.03312.03
5.4.100.0080.04212.04
5.4.90.0100.04212.03
5.4.80.0050.04112.03
5.4.70.0050.04012.02
5.4.60.0050.04112.03
5.4.50.0060.03412.03
5.4.40.0040.03612.02
5.4.30.0040.03612.01
5.4.20.0100.03012.00
5.4.10.0050.03412.01
5.4.00.0030.03811.50
5.3.290.0040.04012.80
5.3.280.0030.04012.71
5.3.270.0090.04212.73
5.3.260.0070.03712.72
5.3.250.0070.04012.72
5.3.240.0090.03312.72
5.3.230.0090.04512.71
5.3.220.0100.03212.68
5.3.210.0070.03812.68
5.3.200.0080.03512.68
5.3.190.0090.03312.68
5.3.180.0050.04212.67
5.3.170.0100.05112.67
5.3.160.0040.03812.68
5.3.150.0070.03612.67
5.3.140.0080.04512.66
5.3.130.0080.04012.65
5.3.120.0080.03912.66
5.3.110.0130.03112.66
5.3.100.0090.03612.13
5.3.90.0080.04112.11
5.3.80.0100.03912.09
5.3.70.0080.03412.10
5.3.60.0060.03712.09
5.3.50.0070.03412.03
5.3.40.0060.03512.03
5.3.30.0080.03111.98
5.3.20.0070.03311.77
5.3.10.0100.03011.74
5.3.00.0020.03911.72
5.2.170.0050.0379.22
5.2.160.0050.0379.23
5.2.150.0060.0439.23
5.2.140.0070.0399.22
5.2.130.0070.0359.18
5.2.120.0060.0349.18
5.2.110.0050.0289.19
5.2.100.0060.0289.18
5.2.90.0030.0309.18
5.2.80.0060.0289.18
5.2.70.0030.0419.18
5.2.60.0050.0399.13
5.2.50.0050.0329.10
5.2.40.0030.0299.08
5.2.30.0060.0279.05
5.2.20.0060.0269.04
5.2.10.0070.0348.95
5.2.00.0050.0298.82
5.1.60.0050.0238.09
5.1.50.0060.0228.09
5.1.40.0070.0238.07
5.1.30.0100.0308.43
5.1.20.0030.0398.45
5.1.10.0070.0298.17
5.1.00.0050.0348.17
5.0.50.0030.0286.65
5.0.40.0050.0316.51
5.0.30.0040.0306.32
5.0.20.0030.0206.30
5.0.10.0040.0276.29
5.0.00.0000.0496.28
4.4.90.0060.0254.78
4.4.80.0040.0174.75
4.4.70.0040.0214.75
4.4.60.0030.0154.75
4.4.50.0050.0134.77
4.4.40.0020.0354.71
4.4.30.0030.0224.76
4.4.20.0020.0254.84
4.4.10.0030.0174.85
4.4.00.0030.0254.76
4.3.110.0030.0154.67
4.3.100.0030.0194.66
4.3.90.0020.0264.63
4.3.80.0040.0364.59
4.3.70.0070.0264.63
4.3.60.0040.0234.63
4.3.50.0030.0184.62
4.3.40.0030.0474.54
4.3.30.0010.0183.30
4.3.20.0010.0223.28
4.3.10.0030.0163.23
4.3.00.0100.0207.82

preferences:
31.43 ms | 400 KiB | 5 Q