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 $foo->bar()::baz(); class bla { 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 bla; 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.0110.01116.63
8.3.50.0110.00416.15
8.3.40.0180.00318.54
8.3.30.0140.00418.84
8.3.20.0040.00420.21
8.3.10.0080.00023.60
8.3.00.0040.00423.65
8.2.180.0130.00716.75
8.2.170.0040.01122.96
8.2.160.0130.00720.47
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0080.00021.12
8.2.120.0040.00426.35
8.2.110.0030.00620.89
8.2.100.0060.00617.93
8.2.90.0000.00719.09
8.2.80.0000.00817.97
8.2.70.0100.00017.37
8.2.60.0060.00317.91
8.2.50.0080.00018.07
8.2.40.0060.00322.15
8.2.30.0040.00419.38
8.2.20.0060.00317.57
8.2.10.0040.00417.96
8.2.00.0040.00418.01
8.1.280.0070.01025.92
8.1.270.0040.01422.05
8.1.260.0060.00328.09
8.1.250.0070.00028.09
8.1.240.0000.00920.81
8.1.230.0120.00019.48
8.1.220.0080.00017.74
8.1.210.0090.00018.77
8.1.200.0060.00317.23
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0080.00018.46
8.1.160.0040.00420.51
8.1.150.0040.00418.68
8.1.140.0050.00319.33
8.1.130.0040.00417.58
8.1.120.0000.00717.41
8.1.110.0000.00817.26
8.1.100.0000.00817.25
8.1.90.0040.00417.32
8.1.80.0000.00717.33
8.1.70.0040.00417.32
8.1.60.0080.00017.36
8.1.50.0000.00817.43
8.1.40.0030.00517.48
8.1.30.0000.00917.55
8.1.20.0040.00417.51
8.1.10.0000.00817.41
8.1.00.0000.00817.45
8.0.300.0000.00718.77
8.0.290.0040.00416.73
8.0.280.0030.00318.36
8.0.270.0030.00317.07
8.0.260.0060.00017.25
8.0.250.0030.00316.96
8.0.240.0040.00416.86
8.0.230.0040.00416.85
8.0.220.0030.00316.80
8.0.210.0030.00316.87
8.0.200.0030.00316.93
8.0.190.0080.00017.02
8.0.180.0050.00216.79
8.0.170.0000.00816.85
8.0.160.0000.00716.79
8.0.150.0040.00416.84
8.0.140.0040.00416.69
8.0.130.0030.00313.33
8.0.120.0040.00416.73
8.0.110.0030.00516.95
8.0.100.0000.00716.91
8.0.90.0070.00016.77
8.0.80.0090.00616.83
8.0.70.0000.00716.78
8.0.60.0000.00716.73
8.0.50.0050.00216.75
8.0.30.0100.00616.96
8.0.20.0140.00617.40
8.0.10.0020.00517.07
8.0.00.0100.01116.75
7.4.330.0030.00316.84
7.4.320.0000.00616.48
7.4.300.0050.00316.36
7.4.290.0000.00716.50
7.4.280.0000.00716.45
7.4.270.0030.00316.56
7.4.260.0070.00016.57
7.4.250.0000.00816.39
7.4.240.0030.00316.34
7.4.230.0030.00316.37
7.4.220.0090.00916.47
7.4.210.0070.01216.58
7.4.200.0000.00716.64
7.4.160.0000.01916.34
7.4.150.0070.01117.40
7.4.140.0060.01417.86
7.4.130.0090.01516.45
7.4.120.0100.00716.42
7.4.110.0070.01016.48
7.4.100.0080.00816.81
7.4.90.0140.00316.43
7.4.80.0000.01619.39
7.4.70.0070.01516.43
7.4.60.0070.01116.54
7.4.50.0120.00316.52
7.4.40.0060.00916.41
7.4.30.0060.01816.43
7.4.00.0100.00814.79
7.3.330.0000.00713.38
7.3.320.0030.00313.13
7.3.310.0000.00716.21
7.3.300.0000.00716.32
7.3.290.0040.00416.33
7.3.280.0150.00716.28
7.3.270.0100.00617.40
7.3.260.0090.00816.45
7.3.240.0090.00916.43
7.3.230.0120.00316.58
7.3.210.0160.00016.55
7.3.200.0100.00719.39
7.3.190.0120.01216.51
7.3.180.0100.00716.50
7.3.170.0110.01116.51
7.3.160.0090.00916.37
7.3.120.0090.00914.54
7.3.110.0040.01414.75
7.3.100.0040.01114.76
7.3.90.0080.00414.80
7.3.80.0060.01014.80
7.3.70.0120.00314.80
7.3.60.0040.01114.64
7.3.50.0040.00814.65
7.3.40.0030.00714.62
7.3.30.0000.01214.61
7.3.20.0040.01216.28
7.3.10.0030.01316.64
7.3.00.0100.00316.63
7.2.330.0070.01616.64
7.2.320.0150.00316.53
7.2.310.0090.00616.56
7.2.300.0140.00916.62
7.2.290.0060.01016.48
7.2.250.0030.01614.64
7.2.240.0140.00014.80
7.2.230.0060.00614.99
7.2.220.0100.00314.65
7.2.210.0070.01015.13
7.2.200.0070.00714.86
7.2.190.0000.01415.02
7.2.180.0030.00614.67
7.2.170.0030.01014.55
7.2.60.0090.00616.45
7.2.00.0000.01019.29
7.1.330.0100.00715.50
7.1.320.0040.00815.47
7.1.310.0000.01315.35
7.1.300.0070.00715.49
7.1.290.0060.00615.38
7.1.280.0000.00815.52
7.1.270.0080.00015.71
7.1.260.0070.00415.63
7.1.200.0080.00415.41
7.1.100.0060.00317.65
7.1.70.0030.00616.90
7.1.60.0090.01219.40
7.1.50.0040.00816.81
7.1.00.0000.08022.37
7.0.200.0000.00916.63
7.0.60.0070.07721.83
7.0.50.0030.07017.86
7.0.40.0070.04720.09
7.0.30.0100.04720.23
7.0.20.0300.08020.22
7.0.10.0130.08020.22
7.0.00.0030.04320.20
5.6.280.0070.07020.89
5.6.210.0070.07720.73
5.6.200.0070.07718.13
5.6.190.0200.07720.68
5.6.180.0330.07320.56
5.6.170.0370.07720.57
5.6.160.0000.04720.54
5.6.150.0030.04018.16
5.6.140.0030.04018.29
5.6.130.0070.03718.29
5.6.120.0000.04321.02
5.6.110.0170.04021.00
5.6.100.0070.07321.04
5.6.90.0070.08021.01
5.6.80.0200.05320.40
5.5.350.4330.04020.32
5.5.340.0130.07717.95
5.5.330.0030.04320.41
5.5.320.0530.07320.27
5.5.310.0170.05720.29
5.5.300.0070.08317.95
5.5.290.0100.08017.98
5.5.280.0130.05320.68
5.5.270.0030.06020.95
5.5.260.0100.06720.88
5.5.250.0030.04020.71
5.5.240.0230.04020.28

preferences:
44.4 ms | 401 KiB | 5 Q