3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Call a static method on a string class or object returned by // an instance method call class foo { static function bar(){ static $flag = 1; $flag++; if ($flag == 2 ) { return 'blee'; } if ($flag == 3){ return new blee; } } } class blee { static function baz() { echo "Oh, for the baz of it!\n"; } } /**********************************/ $foo = new foo; echo $foo::bar()::baz();

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)
8.3.60.0150.00616.38
8.3.50.0100.00921.28
8.3.40.0110.00418.66
8.3.30.0040.01118.80
8.3.20.0030.00520.20
8.3.10.0040.00423.61
8.3.00.0040.00423.32
8.2.180.0110.01116.50
8.2.170.0070.01022.96
8.2.160.0170.00320.11
8.2.150.0110.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00021.13
8.2.120.0040.00426.35
8.2.110.0080.00021.00
8.2.100.0080.00417.80
8.2.90.0040.00419.08
8.2.80.0040.00817.97
8.2.70.0060.00317.38
8.2.60.0000.00917.80
8.2.50.0000.00818.07
8.2.40.0000.01020.46
8.2.30.0040.00419.38
8.2.20.0030.00617.62
8.2.10.0030.00518.18
8.2.00.0000.00718.17
8.1.280.0070.01125.92
8.1.270.0000.00822.14
8.1.260.0000.00828.09
8.1.250.0040.00428.09
8.1.240.0000.00923.92
8.1.230.0040.00819.22
8.1.220.0040.00417.75
8.1.210.0050.00318.77
8.1.200.0030.00617.23
8.1.190.0040.00417.11
8.1.180.0080.00418.10
8.1.170.0040.00418.50
8.1.160.0040.00420.75
8.1.150.0050.00220.63
8.1.140.0050.00319.65
8.1.130.0030.00317.68
8.1.120.0030.00317.47
8.1.110.0000.00817.45
8.1.100.0000.00817.40
8.1.90.0000.00817.36
8.1.80.0000.00817.33
8.1.70.0030.00317.44
8.1.60.0030.00617.48
8.1.50.0050.00317.46
8.1.40.0050.00317.48
8.1.30.0000.00817.62
8.1.20.0000.00817.66
8.1.10.0000.00717.58
8.1.00.0080.00017.52
8.0.300.0070.00018.77
8.0.290.0000.00716.63
8.0.280.0000.00718.55
8.0.270.0030.00317.17
8.0.260.0060.00017.13
8.0.250.0000.00716.93
8.0.240.0000.00716.86
8.0.230.0070.00016.86
8.0.220.0040.00416.79
8.0.210.0070.00016.76
8.0.200.0070.00016.94
8.0.190.0000.00816.95
8.0.180.0040.00416.84
8.0.170.0030.00616.98
8.0.160.0060.00316.79
8.0.150.0040.00416.79
8.0.140.0050.00216.72
8.0.130.0050.00213.27
8.0.120.0080.00016.91
8.0.110.0040.00416.88
8.0.100.0040.00416.95
8.0.90.0030.00416.71
8.0.80.0060.00916.77
8.0.70.0000.00716.84
8.0.60.0020.00516.90
8.0.50.0000.00716.84
8.0.30.0070.01217.16
8.0.20.0100.00917.40
8.0.10.0000.00716.91
8.0.00.0090.01116.66
7.4.330.0000.00616.70
7.4.320.0030.00516.59
7.4.300.0070.00016.55
7.4.290.0030.00316.57
7.4.280.0040.00416.60
7.4.270.0000.00616.48
7.4.260.0050.00516.59
7.4.250.0000.00716.52
7.4.240.0030.00516.52
7.4.230.0030.00316.39
7.4.220.0060.00916.63
7.4.210.0070.00716.54
7.4.200.0000.00716.67
7.4.160.0040.01216.38
7.4.150.0150.00317.40
7.4.140.0110.01017.86
7.4.130.0170.00316.54
7.4.120.0100.00716.57
7.4.110.0110.00716.50
7.4.100.0110.00716.48
7.4.90.0130.00316.44
7.4.80.0120.00719.39
7.4.70.0070.01116.68
7.4.60.0070.01016.47
7.4.50.0070.01016.24
7.4.40.0040.01216.25
7.4.30.0150.01216.56
7.4.00.0030.01215.13
7.3.330.0040.00413.20
7.3.320.0000.00513.36
7.3.310.0050.00316.37
7.3.300.0000.00716.37
7.3.290.0070.00016.22
7.3.280.0110.00716.37
7.3.270.0100.00617.40
7.3.260.0150.00416.38
7.3.250.0100.00916.45
7.3.240.0090.00916.39
7.3.230.0130.00316.39
7.3.210.0060.00916.55
7.3.200.0110.00619.39
7.3.190.0070.01316.19
7.3.180.0070.01016.68
7.3.170.0060.01516.42
7.3.160.0130.00316.58
7.2.330.0070.01016.75
7.2.320.0160.00616.64
7.2.310.0040.01216.59
7.2.300.0130.00316.82
7.2.290.0040.01816.62
7.2.60.0040.01116.96
7.2.00.0110.00019.18
7.1.200.0110.00415.43
7.1.100.0070.00718.05
7.1.70.0000.00817.22
7.1.60.0180.00719.40
7.1.50.0060.01616.87
7.1.00.0100.07022.45
7.0.200.0100.00016.81
7.0.60.0070.07721.59
7.0.50.0100.08017.88
7.0.40.0100.08320.22
7.0.30.0200.04320.07
7.0.20.0300.08020.19
7.0.10.0070.08720.24
7.0.00.0100.03720.07
5.6.280.0070.06720.91
5.6.210.0030.05720.73
5.6.200.0000.08318.19
5.6.190.0000.04720.39
5.6.180.0300.06720.50
5.6.170.0200.04320.54
5.6.160.0130.07720.54
5.6.150.0170.07318.18
5.6.140.0030.04318.18
5.6.130.0100.04318.18
5.6.120.0030.04321.06
5.6.110.0170.08021.01
5.6.100.0100.07321.13
5.6.90.0030.08721.13
5.6.80.0100.07320.38
5.5.350.3530.03720.43
5.5.340.0030.05317.96
5.5.330.0100.08020.27
5.5.320.0600.05720.39
5.5.310.0200.08020.35
5.5.300.0100.06718.10
5.5.290.0100.07318.09
5.5.280.0170.08020.66
5.5.270.0200.07720.96
5.5.260.0100.06320.77
5.5.250.0100.07720.62
5.5.240.0170.08320.26

preferences:
45.59 ms | 401 KiB | 5 Q