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.00416.50
8.3.50.0130.00316.38
8.3.40.0080.00818.86
8.3.30.0140.00418.83
8.3.20.0050.00320.35
8.3.10.0040.00423.66
8.3.00.0080.00023.45
8.2.180.0170.00616.47
8.2.170.0180.00022.96
8.2.160.0100.00320.41
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00021.14
8.2.120.0040.00426.35
8.2.110.0060.00321.12
8.2.100.0070.00418.04
8.2.90.0040.00419.23
8.2.80.0110.00017.97
8.2.70.0090.00017.62
8.2.60.0000.00717.68
8.2.50.0050.00318.07
8.2.40.0040.00820.42
8.2.30.0040.00419.44
8.2.20.0060.00317.73
8.2.10.0070.00018.00
8.2.00.0070.00018.08
8.1.280.0100.00625.92
8.1.270.0110.00422.19
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0090.00922.28
8.1.230.0040.00719.21
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0040.00417.25
8.1.190.0030.00517.35
8.1.180.0120.00018.10
8.1.170.0000.00818.59
8.1.160.0040.00420.64
8.1.150.0070.00020.50
8.1.140.0000.00819.40
8.1.130.0000.00717.57
8.1.120.0000.00717.33
8.1.110.0040.00417.34
8.1.100.0000.00817.36
8.1.90.0040.00417.25
8.1.80.0000.00717.33
8.1.70.0070.00017.25
8.1.60.0000.00717.38
8.1.50.0030.00617.44
8.1.40.0030.00617.37
8.1.30.0000.00817.62
8.1.20.0030.00617.53
8.1.10.0020.00517.50
8.1.00.0070.00017.49
8.0.300.0070.00018.77
8.0.290.0030.00516.60
8.0.280.0070.00018.30
8.0.270.0000.00717.16
8.0.260.0030.00317.21
8.0.250.0030.00316.86
8.0.240.0040.00417.01
8.0.230.0030.00317.00
8.0.220.0000.00716.91
8.0.210.0000.00716.83
8.0.200.0000.00816.88
8.0.190.0040.00416.95
8.0.180.0030.00516.97
8.0.170.0080.00016.93
8.0.160.0030.00316.96
8.0.150.0000.00716.77
8.0.140.0000.00716.84
8.0.130.0000.00513.29
8.0.120.0000.00816.76
8.0.110.0040.00416.81
8.0.100.0070.00016.93
8.0.90.0050.00316.84
8.0.80.0000.01416.84
8.0.70.0040.00416.70
8.0.60.0040.00416.74
8.0.50.0040.00416.83
8.0.30.0040.01516.88
8.0.20.0110.00817.40
8.0.10.0040.00416.88
8.0.00.0060.01116.73
7.4.330.0050.00016.77
7.4.320.0070.00016.54
7.4.300.0000.00816.45
7.4.290.0040.00416.30
7.4.280.0030.00616.45
7.4.270.0060.00016.54
7.4.260.0040.00416.58
7.4.250.0050.00316.52
7.4.240.0040.00416.31
7.4.230.0030.00316.48
7.4.220.0070.00816.49
7.4.210.0110.00916.47
7.4.200.0000.00716.29
7.4.160.0060.01016.36
7.4.150.0100.00617.40
7.4.140.0100.01117.86
7.4.130.0120.01316.64
7.4.120.0070.01016.53
7.4.110.0080.00816.51
7.4.100.0040.01416.50
7.4.90.0080.01216.35
7.4.80.0110.00619.39
7.4.70.0140.00916.55
7.4.60.0110.00516.27
7.4.50.0060.00916.09
7.4.40.0030.01216.61
7.4.30.0150.00316.61
7.4.10.0080.01015.11
7.4.00.0080.00914.89
7.3.330.0030.00313.04
7.3.320.0030.00313.17
7.3.310.0070.00016.37
7.3.300.0000.00716.36
7.3.290.0070.00016.25
7.3.280.0050.01116.33
7.3.270.0110.00617.40
7.3.260.0230.00716.31
7.3.240.0150.00216.50
7.3.230.0110.00716.39
7.3.210.0030.01316.33
7.3.200.0130.00719.39
7.3.190.0140.00716.25
7.3.180.0130.00316.32
7.3.170.0140.00716.50
7.3.160.0060.00916.41
7.3.130.0060.01214.71
7.3.120.0050.01114.75
7.3.110.0100.00814.79
7.3.100.0100.00314.81
7.3.90.0070.00714.67
7.3.80.0070.00814.95
7.3.70.0070.00714.76
7.3.60.0120.00414.74
7.3.50.0030.01214.69
7.3.40.0050.01014.92
7.3.30.0000.01114.65
7.3.20.0050.01016.51
7.3.10.0120.00316.44
7.3.00.0050.00716.57
7.2.330.0170.00316.67
7.2.320.0040.01416.59
7.2.310.0060.01116.38
7.2.300.0120.00616.66
7.2.290.0110.00616.66
7.2.260.0070.01114.71
7.2.250.0070.00714.79
7.2.240.0070.00714.79
7.2.230.0020.01414.96
7.2.220.0020.01214.95
7.2.210.0000.01314.96
7.2.200.0040.00715.02
7.2.190.0120.00314.71
7.2.180.0040.01114.76
7.2.170.0070.00715.04
7.2.160.0050.00614.89
7.2.150.0050.01016.85
7.2.140.0070.00816.79
7.2.130.0040.01016.73
7.2.120.0050.00816.70
7.2.110.0080.00616.74
7.2.100.0020.01216.79
7.2.90.0110.00916.90
7.2.80.0060.01016.76
7.2.70.0050.00716.70
7.2.60.0090.00416.82
7.2.50.0080.00316.57
7.2.40.0080.00416.71
7.2.30.0140.00316.85
7.2.20.0070.00716.59
7.2.10.0070.01016.79
7.2.00.0060.00717.58
7.1.330.0080.00515.64
7.1.320.0060.00915.53
7.1.310.0060.00815.75
7.1.300.0060.00515.51
7.1.290.0050.00515.56
7.1.280.0110.00215.72
7.1.270.0070.00515.35
7.1.260.0080.00515.64
7.1.250.0010.01215.55
7.1.240.0030.00815.60
7.1.230.0020.01215.59
7.1.220.0040.00915.67
7.1.210.0060.00915.66
7.1.200.0080.00615.43
7.1.190.0060.00615.71
7.1.180.0090.00515.52
7.1.170.0070.00715.62
7.1.160.0060.00715.71
7.1.150.0070.00515.54
7.1.140.0060.00615.60
7.1.130.0070.00515.58
7.1.120.0040.01115.46
7.1.110.0060.01015.58
7.1.100.0040.00816.30
7.1.90.0070.00715.49
7.1.80.0020.01415.74
7.1.70.0030.00816.07
7.1.60.0070.00816.92
7.1.50.0050.01116.08
7.1.40.0070.01015.66
7.1.30.0070.00815.68
7.1.20.0070.00515.63
7.1.10.0040.00915.64
7.1.00.0020.03317.91
7.0.330.0030.01215.20
7.0.320.0060.00815.32
7.0.310.0070.01015.27
7.0.300.0040.01115.26
7.0.290.0050.00815.24
7.0.280.0070.00715.25
7.0.270.0070.00615.27
7.0.260.0070.00915.06
7.0.250.0060.00715.31
7.0.240.0030.00715.38
7.0.230.0030.01015.30
7.0.220.0080.00815.18
7.0.210.0070.00915.37
7.0.200.0010.01015.66
7.0.190.0070.00415.39
7.0.180.0100.00315.05
7.0.170.0070.00915.30
7.0.160.0030.01115.16
7.0.150.0080.00815.25
7.0.140.0040.00715.23
7.0.130.0060.00515.46
7.0.120.0050.00915.38
7.0.110.0040.00915.13
7.0.100.0060.00515.43
7.0.90.0090.00315.31
7.0.80.0070.00715.30
7.0.70.0070.00815.13
7.0.60.0040.03517.43
7.0.50.0090.01916.15
7.0.40.0070.02315.64
7.0.30.0120.01615.78
7.0.20.0130.03215.68
7.0.10.0030.02415.68
7.0.00.0050.02115.66
5.6.400.0020.00914.37
5.6.390.0100.00214.14
5.6.380.0100.00414.27
5.6.370.0090.00414.14
5.6.360.0030.00914.18
5.6.350.0030.01114.26
5.6.340.0100.00414.40
5.6.330.0030.01014.13
5.6.320.0080.00514.23
5.6.310.0070.00514.22
5.6.300.0060.01014.09
5.6.290.0080.00814.13
5.6.280.0050.01014.16
5.6.270.0030.01314.08
5.6.260.0050.00713.96
5.6.250.0080.00514.07
5.6.240.0030.01014.01
5.6.230.0050.00814.28
5.6.220.0080.00314.17
5.6.210.0100.03016.26
5.6.200.0060.03115.48
5.6.190.0070.03016.14
5.6.180.0160.03016.22
5.6.170.0140.02916.32
5.6.160.0070.01716.19
5.6.150.0020.02115.51
5.6.140.0020.01915.40
5.6.130.0030.02215.37
5.6.120.0040.01916.35
5.6.110.0120.02816.47
5.6.100.0010.03916.46
5.6.90.0110.03016.40
5.6.80.0050.02316.23
5.6.70.0080.00714.11
5.6.60.0050.00814.04
5.6.50.0050.00614.10
5.6.40.0060.00614.00
5.6.30.0080.00614.02
5.6.20.0060.01114.05
5.6.10.0020.01113.99
5.6.00.0030.00914.04
5.5.380.0110.00314.03
5.5.370.0120.00214.09
5.5.360.0100.00514.15
5.5.350.1460.01416.17
5.5.340.0090.02815.44
5.5.330.0060.02716.00
5.5.320.0250.02216.05
5.5.310.0080.02316.10
5.5.300.0040.03215.43
5.5.290.0070.03215.54
5.5.280.0090.01916.34
5.5.270.0090.02916.41
5.5.260.0070.03416.25
5.5.250.0030.02216.13
5.5.240.0110.03015.94
5.5.230.0050.00714.24
5.5.220.0040.00613.86
5.5.210.0100.00214.10
5.5.200.0100.00213.71
5.5.190.0070.00714.15
5.5.180.0080.00614.00
5.5.170.0050.00913.90
5.5.160.0050.01013.80
5.5.150.0120.00313.97
5.5.140.0090.00413.97
5.5.130.0060.00714.08
5.5.120.0030.01313.94
5.5.110.0050.00914.10
5.5.100.0050.01013.96
5.5.90.0020.01314.01
5.5.80.0090.00613.98
5.5.70.0030.00813.74
5.5.60.0050.00613.86
5.5.50.0060.00613.95
5.5.40.0050.00813.81
5.5.30.0070.00814.15
5.5.20.0060.00514.05
5.5.10.0040.00913.83
5.5.00.0100.00513.80

preferences:
48.95 ms | 400 KiB | 5 Q