3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Lol { abstract public static function run(); public static function onceLol() { if (static::$cache!==NULL) { return static::$cache; } static::$cache = static::run(); return static::$cache; } } class Lol1 extends Lol { protected static $cache = NULL; public static function run() { echo "Lol1\n"; return 'PHP is the best language in the shit'; } } class Lol2 extends Lol { protected static $cache = NULL; public static function run() { echo "Lol2\n"; return 'Just lol'; } } echo Lol1::onceLol(); // echoing 'PHP is the best language in the shit' from Lol1 echo "\n"; echo Lol2::onceLol(); // echoing 'PHP is the best language in the shit' from Lol1 echo "\n"; echo Lol1::onceLol(); // echoing 'PHP is the best language in the shit' from Lol1 echo "\n"; echo Lol2::onceLol(); // echoing 'PHP is the best language in the shit' from Lol1

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.4.120.0120.00820.71
8.4.110.0070.00422.32
8.4.100.0080.01317.57
8.4.90.0160.00617.58
8.4.80.0150.00617.84
8.4.70.0140.00717.59
8.4.60.0120.00917.91
8.4.50.0020.00618.71
8.4.40.0090.00919.39
8.4.30.0030.00620.44
8.4.20.0070.01020.63
8.4.10.0120.00919.64
8.3.250.0090.00919.05
8.3.240.0100.00116.71
8.3.230.0160.00416.54
8.3.220.0130.00617.17
8.3.210.0030.00516.63
8.3.200.0120.00716.25
8.3.190.0120.00716.41
8.3.180.0130.00616.80
8.3.170.0090.00920.75
8.3.160.0080.00818.39
8.3.150.0130.00617.11
8.3.140.0060.00318.25
8.3.130.0070.00318.49
8.3.120.0040.00418.96
8.3.110.0050.00520.94
8.3.100.0030.00624.06
8.3.90.0050.00226.77
8.3.80.0060.00319.36
8.3.70.0140.00018.31
8.3.60.0120.00318.31
8.3.50.0180.00523.57
8.3.40.0150.00318.76
8.3.30.0070.00718.90
8.3.20.0080.00020.73
8.3.10.0050.00322.09
8.3.00.0000.00721.91
8.2.290.0100.00620.38
8.2.280.0070.00518.76
8.2.270.0170.00316.50
8.2.260.0070.00019.00
8.2.250.0060.00316.67
8.2.240.0180.00019.05
8.2.230.0070.01422.58
8.2.220.0000.00837.54
8.2.210.0120.00626.77
8.2.200.0090.00018.88
8.2.190.0130.00316.58
8.2.180.0120.00918.15
8.2.170.0090.00622.96
8.2.160.0100.00722.12
8.2.150.0070.00024.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0020.00526.16
8.2.110.0000.00920.52
8.2.100.0080.00417.78
8.2.90.0090.00017.50
8.2.80.0040.00417.97
8.2.70.0090.00017.50
8.2.60.0000.00817.63
8.2.50.0080.00018.05
8.2.40.0000.00919.95
8.2.30.0000.00718.07
8.2.20.0000.00718.05
8.2.10.0080.00019.06
8.2.00.0000.00719.19
8.1.330.0110.00916.47
8.1.320.0110.00816.29
8.1.310.0070.00717.05
8.1.300.0090.00018.38
8.1.290.0030.00630.84
8.1.280.0070.00725.92
8.1.270.0030.00620.07
8.1.260.0070.00026.35
8.1.250.0090.00028.09
8.1.240.0090.00023.95
8.1.230.0040.00719.10
8.1.220.0030.00617.77
8.1.210.0040.00418.77
8.1.200.0030.01017.35
8.1.190.0060.00317.23
8.1.180.0000.00818.10
8.1.170.0080.00017.62
8.1.160.0040.00418.71
8.1.150.0040.00419.03
8.1.140.0030.00522.57
8.1.130.0070.00022.11
8.1.120.0000.00717.30
8.1.110.0050.00317.39
8.1.100.0000.00817.31
8.1.90.0040.00417.30
8.1.80.0040.00417.46
8.1.70.0070.00017.30
8.1.60.0040.00417.55
8.1.50.0080.00017.46
8.1.40.0050.00317.52
8.1.30.0090.00017.60
8.1.20.0040.00417.64
8.1.10.0040.00417.61
8.1.00.0080.00417.53
8.0.300.0000.00821.60
8.0.290.0000.00716.75
8.0.280.0030.00318.52
8.0.270.0070.00018.05
8.0.260.0000.00720.05
8.0.250.0040.00416.98
8.0.240.0040.00416.95
8.0.230.0070.00016.79
8.0.220.0030.00316.83
8.0.210.0030.00316.86
8.0.200.0030.00316.77
8.0.190.0000.00816.88
8.0.180.0040.00416.90
8.0.170.0000.01016.89
8.0.160.0040.00416.73
8.0.150.0040.00416.83
8.0.140.0000.01016.81
8.0.130.0050.00013.25
8.0.120.0030.00616.68
8.0.110.0040.00416.80
8.0.100.0000.00716.71
8.0.90.0080.00016.87
8.0.80.0110.00616.81
8.0.70.0040.00416.90
8.0.60.0040.00416.88
8.0.50.0050.00216.70
8.0.30.0040.01217.02
8.0.20.0080.01116.98
8.0.10.0070.00016.82
8.0.00.0110.00716.57
7.4.330.0020.00216.79
7.4.320.0050.00216.48
7.4.300.0060.00316.45
7.4.290.0030.00316.65
7.4.280.0050.00516.41
7.4.270.0030.00316.53
7.4.260.0000.00513.39
7.4.250.0000.00716.37
7.4.240.0040.00316.55
7.4.230.0000.00716.61
7.4.220.0040.00416.57
7.4.210.0050.01116.54
7.4.200.0050.00216.30
7.4.130.0030.01516.52
7.4.120.0060.01516.49
7.4.110.0110.00716.70
7.4.100.0130.00316.62
7.4.90.0080.01416.63
7.4.80.0090.00919.39
7.4.70.0060.01216.61
7.4.60.0030.01616.45
7.4.50.0040.01116.16
7.4.40.0000.01716.51
7.4.10.0110.01416.45
7.4.00.0090.01316.36
7.3.330.0000.00716.29
7.3.320.0050.00013.30
7.3.310.0000.00816.30
7.3.300.0000.00716.31
7.3.290.0120.00516.26
7.3.260.0100.00916.34
7.3.230.0070.01116.57
7.3.210.0090.01216.25
7.3.200.0060.01516.34
7.3.190.0040.01216.33
7.3.180.0040.01116.38
7.3.170.0060.00916.43
7.3.160.0130.00316.29
7.3.130.0170.00016.26
7.3.120.0110.01116.42
7.3.110.0150.00916.50
7.3.100.0040.01616.23
7.3.90.0070.01416.45
7.3.80.0150.00316.19
7.3.70.0070.01116.19
7.3.60.0110.00816.34
7.3.50.0060.01216.35
7.3.40.0070.01016.27
7.3.30.0100.01016.24
7.3.20.0090.01616.18
7.3.10.0170.01016.05
7.3.00.0240.00616.32
7.2.330.0100.00716.44
7.2.320.0090.01316.40
7.2.310.0100.00716.49
7.2.300.0110.01116.82
7.2.290.0100.00716.52
7.2.260.0160.00916.55
7.2.250.0130.01016.55
7.2.240.0070.01116.75
7.2.230.0160.00816.81
7.2.220.0130.00416.72
7.2.210.0110.01016.49
7.2.200.0070.01016.50
7.2.190.0130.00316.48
7.2.180.0110.01116.50
7.2.170.0040.01316.34
7.2.160.0090.01316.35
7.2.150.0140.00716.60
7.2.140.0160.00916.66
7.2.130.0140.00916.52
7.2.120.0100.01416.48
7.2.110.0120.00616.61
7.2.100.0130.01016.49
7.2.90.0090.01216.68
7.2.80.0120.01216.43
7.2.70.0080.01716.64
7.2.60.0110.01416.41
7.2.50.0100.01016.46
7.2.40.0070.01116.63
7.2.30.0120.00916.63
7.2.20.0140.00716.47
7.2.10.0090.00916.50
7.2.00.0140.00416.50

preferences:
29.05 ms | 403 KiB | 5 Q