3v4l.org

run code in 300+ PHP versions simultaneously
<?php class bla { static function bar(){ static $flag = 0; $flag++; if ($flag == 1 ) { echo 'string name blee',"\n"; return 'blee'; } if ($flag == 2){ echo 'new object blee',"\n"; return new blee; } } } class blee { static $baz = "Oh, baz!\n"; } /**********************************/ $foo = "bla"; echo $foo::bar()::$baz; $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.0090.00616.63
8.3.50.0080.01121.98
8.3.40.0040.01118.61
8.3.30.0150.00618.60
8.3.20.0040.00420.13
8.3.10.0080.00023.74
8.3.00.0030.00623.71
8.2.180.0140.00718.17
8.2.170.0150.00422.96
8.2.160.0080.01220.53
8.2.150.0070.00724.18
8.2.140.0040.00424.66
8.2.130.0000.00821.02
8.2.120.0080.00026.35
8.2.110.0030.00721.02
8.2.100.0030.00717.92
8.2.90.0050.00319.08
8.2.80.0040.00417.97
8.2.70.0000.00917.63
8.2.60.0030.00617.80
8.2.50.0050.00318.07
8.2.40.0060.00320.61
8.2.30.0000.00719.42
8.2.20.0030.00717.63
8.2.10.0040.00418.05
8.2.00.0040.00418.18
8.1.280.0170.00025.92
8.1.270.0130.00622.14
8.1.260.0000.00828.09
8.1.250.0040.00428.09
8.1.240.0030.00619.15
8.1.230.0120.00019.15
8.1.220.0060.00317.74
8.1.210.0060.00318.77
8.1.200.0040.00417.35
8.1.190.0050.00317.35
8.1.180.0090.00018.10
8.1.170.0040.00418.46
8.1.160.0050.00320.83
8.1.150.0080.00020.58
8.1.140.0000.00819.53
8.1.130.0040.00417.62
8.1.120.0040.00417.40
8.1.110.0040.00417.49
8.1.100.0000.00717.53
8.1.90.0030.00517.48
8.1.80.0040.00417.48
8.1.70.0030.00317.38
8.1.60.0080.00017.49
8.1.50.0050.00317.53
8.1.40.0030.00517.41
8.1.30.0030.00617.64
8.1.20.0080.00017.50
8.1.10.0000.00817.60
8.1.00.0040.00417.48
8.0.300.0070.00018.77
8.0.290.0070.00016.63
8.0.280.0000.00818.32
8.0.270.0000.00717.31
8.0.260.0060.00017.31
8.0.250.0030.00516.95
8.0.240.0000.00717.02
8.0.230.0000.00716.89
8.0.220.0070.00016.92
8.0.210.0070.00016.96
8.0.200.0000.00716.97
8.0.190.0040.00416.82
8.0.180.0040.00416.97
8.0.170.0040.00416.95
8.0.160.0040.00416.76
8.0.150.0070.00016.85
8.0.140.0000.00716.73
8.0.130.0000.00613.25
8.0.120.0000.00816.84
8.0.110.0050.00316.81
8.0.100.0000.00716.95
8.0.90.0050.00316.91
8.0.80.0070.01016.84
8.0.70.0000.00716.84
8.0.60.0000.00716.93
8.0.50.0040.00416.90
8.0.30.0060.01017.17
8.0.20.0130.00817.40
8.0.10.0040.00417.04
8.0.00.0090.01116.73
7.4.330.0030.00316.67
7.4.320.0000.00616.52
7.4.300.0030.00316.58
7.4.290.0030.00316.53
7.4.280.0040.00416.62
7.4.270.0080.00016.62
7.4.260.0080.00016.39
7.4.250.0030.00516.55
7.4.240.0070.00016.62
7.4.230.0030.00316.64
7.4.220.0070.01016.51
7.4.210.0090.00716.45
7.4.200.0030.00316.61
7.4.160.0030.01616.27
7.4.150.0060.01117.40
7.4.140.0140.00817.86
7.4.130.0210.00716.54
7.4.120.0100.00716.37
7.4.110.0030.01416.46
7.4.100.0090.00916.55
7.4.90.0140.00316.30
7.4.80.0060.01319.39
7.4.70.0090.00816.68
7.4.60.0180.00016.46
7.4.50.0080.00516.55
7.4.40.0120.00916.35
7.4.30.0100.01316.65
7.4.10.0070.01014.73
7.4.00.0100.00515.05
7.3.330.0020.00413.34
7.3.320.0060.00013.38
7.3.310.0070.00016.33
7.3.300.0030.00316.32
7.3.290.0030.00316.22
7.3.280.0100.00516.31
7.3.270.0070.01017.40
7.3.260.0000.02016.44
7.3.240.0090.01116.48
7.3.230.0130.01016.55
7.3.210.0170.00016.27
7.3.200.0100.00719.39
7.3.190.0060.01516.34
7.3.180.0150.00316.55
7.3.170.0100.01016.68
7.3.160.0060.01016.64
7.3.130.0120.00614.85
7.3.120.0090.00815.00
7.3.110.0070.01214.69
7.3.100.0040.01014.85
7.3.90.0070.00815.05
7.3.80.0070.00614.96
7.3.70.0040.00614.79
7.3.60.0050.00714.69
7.3.50.0050.01014.61
7.3.40.0080.00714.74
7.3.30.0070.00614.86
7.3.20.0050.01016.74
7.3.10.0090.00616.70
7.3.00.0030.00916.55
7.2.330.0130.00916.71
7.2.320.0120.01216.86
7.2.310.0130.00416.77
7.2.300.0100.00716.59
7.2.290.0120.00616.46
7.2.260.0070.01015.30
7.2.250.0050.01514.94
7.2.240.0080.01015.17
7.2.230.0070.01015.33
7.2.220.0070.00714.76
7.2.210.0060.00615.19
7.2.200.0090.00615.03
7.2.190.0040.00714.88
7.2.180.0050.00815.11
7.2.170.0100.00814.98
7.2.160.0100.00715.14
7.2.150.0030.00916.96
7.2.140.0080.00816.84
7.2.130.0030.00917.08
7.2.120.0030.00616.65
7.2.110.0100.00316.94
7.2.100.0060.00917.07
7.2.90.0030.01417.05
7.2.80.0100.00717.03
7.2.70.0060.01317.07
7.2.60.0050.01017.00
7.2.50.0070.01116.66
7.2.40.0030.00717.09
7.2.30.0050.00516.68
7.2.20.0030.01016.92
7.2.10.0080.00817.01
7.2.00.0000.01318.25
7.1.330.0070.00815.84
7.1.320.0070.00715.65
7.1.310.0080.00315.82
7.1.300.0030.01315.67
7.1.290.0070.00515.77
7.1.280.0050.00815.57
7.1.270.0080.00615.73
7.1.260.0050.00715.69
7.1.250.0040.00415.48
7.1.240.0030.00915.74
7.1.230.0100.00315.70
7.1.220.0100.00315.76
7.1.210.0070.00715.64
7.1.200.0080.00915.67
7.1.190.0030.01015.56
7.1.180.0090.00915.73
7.1.170.0000.00915.75
7.1.160.0040.01115.57
7.1.150.0030.01015.45
7.1.140.0070.00715.88
7.1.130.0000.01415.31
7.1.120.0070.00815.72
7.1.110.0070.00415.44
7.1.100.0030.00716.72
7.1.90.0000.01415.81
7.1.80.0130.00015.83
7.1.70.0050.00716.46
7.1.60.0100.00817.54
7.1.50.0050.01316.17
7.1.40.0030.01315.97
7.1.30.0030.01015.69
7.1.20.0060.00915.76
7.1.10.0030.01015.41
7.1.00.0030.04419.00
7.0.330.0030.00615.34
7.0.320.0000.01515.04
7.0.310.0120.00615.40
7.0.300.0000.00815.16
7.0.290.0000.00915.38
7.0.280.0070.00315.42
7.0.270.0070.01015.41
7.0.260.0040.00715.22
7.0.250.0000.01115.63
7.0.240.0030.01015.53
7.0.230.0070.00715.56
7.0.220.0030.00615.31
7.0.210.0110.00015.36
7.0.200.0050.00616.01
7.0.190.0000.01315.20
7.0.180.0030.01015.48
7.0.170.0030.01315.44
7.0.160.0110.00415.13
7.0.150.0090.00915.52
7.0.140.0080.00815.21
7.0.130.0080.00415.23
7.0.120.0060.00315.38
7.0.110.0120.00315.30
7.0.100.0080.00415.39
7.0.90.0030.00915.31
7.0.80.0100.00315.40
7.0.70.0050.00515.41
7.0.60.0050.04018.55
7.0.50.0080.02316.59
7.0.40.0050.03917.02
7.0.30.0120.02716.98
7.0.20.0150.04717.09
7.0.10.0090.03416.98
7.0.00.0070.04516.99
5.6.400.0070.00714.14
5.6.390.0090.00613.93
5.6.380.0090.00914.03
5.6.370.0080.00414.36
5.6.360.0030.01013.89
5.6.350.0090.00614.13
5.6.340.0030.00614.09
5.6.330.0030.00914.24
5.6.320.0060.00614.39
5.6.310.0040.01114.05
5.6.300.0060.00914.03
5.6.290.0030.01314.34
5.6.280.0070.03217.48
5.6.270.0060.00614.18
5.6.260.0060.00314.11
5.6.250.0040.00814.35
5.6.240.0070.01013.98
5.6.230.0060.00613.99
5.6.220.0000.01214.28
5.6.210.0080.04317.46
5.6.200.0110.02516.21
5.6.190.0050.05117.41
5.6.180.0100.03017.34
5.6.170.0260.03517.42
5.6.160.0100.04117.36
5.6.150.0110.04016.14
5.6.140.0070.04016.18
5.6.130.0000.03016.07
5.6.120.0050.03117.68
5.6.110.0080.04117.63
5.6.100.0050.04817.57
5.6.90.0180.04017.52
5.6.80.0060.03917.13
5.6.70.0040.01113.93
5.6.60.0060.00614.07
5.6.50.0070.00713.89
5.6.40.0030.01014.16
5.6.30.0110.00013.97
5.6.20.0090.00314.13
5.6.10.0130.00314.04
5.6.00.0120.00314.06
5.5.380.0040.00414.19
5.5.370.0080.00513.92
5.5.360.0040.00813.96
5.5.350.2140.02117.23
5.5.340.0060.03516.16
5.5.330.0070.03017.35
5.5.320.0170.03517.31
5.5.310.0100.02217.08
5.5.300.0070.04516.15
5.5.290.0090.04416.14
5.5.280.0100.02917.44
5.5.270.0050.03517.40
5.5.260.0080.04317.51
5.5.250.0090.03717.30
5.5.240.0160.03817.08
5.5.230.0090.00613.89
5.5.220.0130.00313.98
5.5.210.0030.00913.89
5.5.200.0080.00413.89
5.5.190.0130.00013.89
5.5.180.0000.01614.14
5.5.170.0100.00313.89
5.5.160.0090.00313.89
5.5.150.0030.00914.16
5.5.140.0030.00914.32
5.5.130.0060.01013.89
5.5.120.0090.00613.89
5.5.110.0030.00913.89
5.5.100.0110.00313.89
5.5.90.0100.00313.95
5.5.80.0030.01014.13
5.5.70.0060.00313.89
5.5.60.0060.01213.97
5.5.50.0000.00813.89
5.5.40.0030.00913.98
5.5.30.0030.00613.89
5.5.20.0060.00613.89
5.5.10.0060.00614.29
5.5.00.0060.00614.21

preferences:
38.13 ms | 401 KiB | 5 Q