3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class almostSingleton { final protected function __construct() { echo 'Built ' . get_class($this) . PHP_EOL; } } class GoodTwin extends almostSingleton { } class EvilTwin extends almostSingleton { public static function static_getGoodTwin() { return new GoodTwin(); } public function getGoodTwin() { return new GoodTwin(); } } $gotcha = EvilTwin::static_getGoodTwin(); $et = new EvilTwin(); $nope = $et->getGoodTwin();

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.70.0040.01516.38
8.3.60.0100.01016.63
8.3.50.0100.00921.08
8.3.40.0060.00918.84
8.3.30.0170.00318.78
8.3.20.0040.00420.35
8.3.10.0040.00420.48
8.3.00.0040.00423.58
8.2.190.0090.00618.28
8.2.180.0100.01016.63
8.2.170.0090.00622.96
8.2.160.0070.01021.24
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0040.00422.08
8.2.120.0040.00426.35
8.2.110.0000.00920.82
8.2.100.0070.00417.91
8.2.90.0050.00319.09
8.2.80.0090.00017.97
8.2.70.0060.00317.75
8.2.60.0040.00417.80
8.2.50.0030.00618.10
8.2.40.0070.00022.17
8.2.30.0050.00319.15
8.2.20.0040.00417.90
8.2.10.0000.00718.02
8.2.00.0030.00617.78
8.1.280.0090.00525.92
8.1.270.0000.00823.95
8.1.260.0080.00028.09
8.1.250.0070.00028.09
8.1.240.0060.00322.51
8.1.230.0120.00017.70
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0030.00617.35
8.1.190.0080.00017.36
8.1.180.0040.00418.10
8.1.170.0080.00018.48
8.1.160.0070.00022.05
8.1.150.0040.00418.84
8.1.140.0000.00719.48
8.1.130.0000.00717.61
8.1.120.0040.00417.35
8.1.110.0000.00717.38
8.1.100.0020.00517.31
8.1.90.0040.00417.38
8.1.80.0040.00417.33
8.1.70.0000.00717.40
8.1.60.0040.00417.64
8.1.50.0030.00617.33
8.1.40.0040.00417.43
8.1.30.0060.00317.69
8.1.20.0040.00417.62
8.1.10.0050.00317.61
8.1.00.0070.00017.50
8.0.300.0000.00718.77
8.0.290.0070.00016.75
8.0.280.0000.00718.47
8.0.270.0000.00817.29
8.0.260.0000.00817.38
8.0.250.0030.00316.92
8.0.240.0030.00317.04
8.0.230.0070.00016.90
8.0.220.0070.00016.93
8.0.210.0070.00016.86
8.0.200.0000.00616.94
8.0.190.0040.00416.93
8.0.180.0030.00316.94
8.0.170.0040.00416.91
8.0.160.0070.00016.93
8.0.150.0030.00516.79
8.0.140.0040.00416.93
8.0.130.0000.00513.36
8.0.120.0040.00416.79
8.0.110.0040.00416.74
8.0.100.0040.00416.95
8.0.90.0050.00217.01
8.0.80.0090.01316.90
8.0.70.0030.00616.89
8.0.60.0040.00416.71
8.0.50.0040.00416.68
8.0.30.0070.01117.02
8.0.20.0080.01117.40
8.0.10.0060.00316.89
8.0.00.0070.01016.71
7.4.330.0000.00515.08
7.4.320.0000.00616.41
7.4.300.0000.00616.41
7.4.290.0070.00016.45
7.4.280.0000.00716.47
7.4.270.0070.00016.49
7.4.260.0000.00716.47
7.4.250.0030.00316.36
7.4.240.0000.00716.41
7.4.230.0030.00316.30
7.4.220.0060.00916.68
7.4.210.0100.00716.66
7.4.200.0040.00416.66
7.4.160.0090.00716.53
7.4.150.0070.01017.40
7.4.140.0100.01117.86
7.4.130.0140.00516.57
7.4.120.0090.00916.62
7.4.110.0080.00816.46
7.4.100.0150.00316.52
7.4.90.0070.01016.69
7.4.80.0060.01819.39
7.4.70.0060.01216.71
7.4.60.0060.01016.41
7.4.50.0080.00816.61
7.4.40.0080.00816.48
7.4.30.0030.01516.53
7.3.330.0050.00013.31
7.3.320.0030.00313.37
7.3.310.0030.00316.23
7.3.300.0030.00316.21
7.3.290.0050.01316.33
7.3.280.0090.01216.34
7.3.270.0130.00617.40
7.3.260.0120.00716.34
7.3.250.0100.00716.37
7.3.240.0100.00716.35
7.3.230.0110.00716.41
7.3.210.0120.00916.38
7.3.200.0060.01216.37
7.3.190.0000.01716.57
7.3.180.0090.01216.40
7.3.170.0190.00316.59
7.3.160.0110.00816.36
7.2.330.0110.00616.63
7.2.320.0090.01316.76
7.2.310.0040.01216.78
7.2.300.0120.00616.79
7.2.290.0040.01416.83
7.0.110.0070.03022.15
7.0.100.0000.03722.12
7.0.90.0030.04722.20
7.0.80.0070.03022.06
7.0.70.0030.03322.01
7.0.60.0000.03722.07
7.0.50.0030.04021.98
7.0.40.0070.03022.07
7.0.30.0030.03322.14
7.0.20.0000.03722.05
7.0.10.0070.03022.16
7.0.00.0030.03722.05
5.6.260.0000.03721.08
5.6.250.0000.03720.84
5.6.240.0000.05021.04
5.6.230.0000.04021.06
5.6.220.0030.03320.80
5.6.210.0100.02720.98
5.6.200.0000.04020.91
5.6.190.0000.04021.03
5.6.180.0030.03720.75
5.6.170.0000.04020.83
5.6.160.0100.03021.08
5.6.150.0100.03021.00
5.6.140.0030.03721.02
5.6.130.0000.04021.03
5.6.120.0030.03721.02
5.6.110.0030.04720.82
5.6.100.0000.04021.06
5.6.90.0030.03021.04
5.6.80.0030.03020.30
5.6.70.0030.03320.21
5.6.60.0030.03320.28
5.6.50.0030.03020.43
5.6.40.0070.03020.29
5.6.30.0000.03320.37
5.6.20.0030.03720.18
5.6.10.0070.02720.28
5.6.00.0000.03320.18
5.5.380.0000.05317.59
5.5.370.0000.03317.59
5.5.360.0000.05317.71
5.5.350.0030.03317.59
5.5.340.0030.03318.12
5.5.330.0070.03018.09
5.5.320.0030.03717.91
5.5.310.0000.03318.09
5.5.300.0000.04018.12
5.5.290.0070.03018.09
5.5.280.0000.03718.04
5.5.270.0100.03317.95
5.5.260.0030.03718.24
5.5.250.0000.03318.04
5.5.240.0000.03717.64
5.5.230.0030.03317.61
5.5.220.0070.03017.44
5.5.210.0070.02717.48
5.5.200.0000.03317.61
5.5.190.0030.03717.57
5.5.180.0030.03017.60
5.5.160.0070.02717.45
5.5.150.0030.03017.48
5.5.140.0000.03317.26
5.5.130.0000.03317.39
5.5.120.0000.03317.44
5.5.110.0030.03717.59
5.5.100.0070.02717.38
5.5.90.0070.02717.50
5.5.80.0030.03317.48
5.5.70.0000.05317.30
5.5.60.0000.03317.29
5.5.50.0000.03017.06
5.5.40.0000.03017.46
5.5.30.0000.03017.48
5.5.20.0030.03017.43
5.5.10.0000.03717.42
5.5.00.0000.04317.20
5.4.450.0000.03719.46
5.4.440.0030.04319.27
5.4.430.0000.03319.62
5.4.420.0070.02719.48
5.4.410.0070.03319.20
5.4.400.0030.03018.96
5.4.390.0030.04019.08
5.4.380.0070.03018.98
5.4.370.0030.02719.17
5.4.360.0030.03019.23
5.4.350.0030.03018.99
5.4.340.0000.03319.21
5.4.320.0000.03319.15
5.4.310.0070.02719.30
5.4.300.0030.03019.32
5.4.290.0000.03019.33
5.4.280.0000.03319.14
5.4.270.0030.03718.98
5.4.260.0030.02719.13
5.4.250.0030.03019.16
5.4.240.0070.02719.02
5.4.230.0000.04719.08
5.4.220.0030.03319.08
5.4.210.0030.03719.32
5.4.200.0000.03019.32
5.4.190.0030.03019.01
5.4.180.0000.03319.00
5.4.170.0000.03018.97
5.4.160.0100.02718.98
5.4.150.0030.03019.11
5.4.140.0000.03016.58
5.4.130.0000.03016.44
5.4.120.0000.03016.59
5.4.110.0030.03316.34
5.4.100.0000.03016.51
5.4.90.0000.03016.59
5.4.80.0030.02716.34
5.4.70.0030.02716.57
5.4.60.0070.03016.48
5.4.50.0000.03716.51
5.4.40.0030.02716.67
5.4.30.0000.03016.51
5.4.20.0070.02716.53
5.4.10.0030.03016.43
5.4.00.0000.03315.75
5.3.290.0000.03314.80
5.3.280.0030.05014.73
5.3.270.0030.03014.60
5.3.260.0000.03314.75
5.3.250.0030.03014.75
5.3.240.0000.03014.75
5.3.230.0000.03014.82
5.3.220.0000.03314.59
5.3.210.0030.03014.55
5.3.200.0000.03014.58
5.3.190.0070.02714.52
5.3.180.0000.03014.69
5.3.170.0070.03314.55
5.3.160.0000.04314.62
5.3.150.0100.02314.56
5.3.140.0030.02714.69
5.3.130.0000.03314.55
5.3.120.0000.03314.54
5.3.110.0030.03014.52
5.3.100.0030.02713.89
5.3.90.0000.03714.02
5.3.80.0000.03014.16
5.3.70.0030.02714.02
5.3.60.0030.02714.02
5.3.50.0070.03014.08
5.3.40.0000.03713.96
5.3.30.0070.03014.00
5.3.20.0000.03013.68
5.3.10.0030.02713.64
5.3.00.0030.02713.61
5.2.170.0000.02311.13
5.2.160.0000.02311.18
5.2.150.0000.03011.16
5.2.140.0030.02311.02
5.2.130.0000.02311.09
5.2.120.0000.02711.10
5.2.110.0000.02311.19
5.2.100.0070.01711.06
5.2.90.0030.02011.25
5.2.80.0000.02711.23
5.2.70.0000.02711.06
5.2.60.0030.02311.03
5.2.50.0100.01711.15
5.2.40.0030.02011.06
5.2.30.0070.02010.99
5.2.20.0000.03010.91
5.2.10.0000.02310.71
5.2.00.0000.02310.57
5.1.60.0000.03010.35
5.1.50.0000.02010.35
5.1.40.0000.02010.35
5.1.30.0030.02010.35
5.1.20.0030.02010.35
5.1.10.0000.02310.35
5.1.00.0030.01710.35
5.0.50.0030.02010.35
5.0.40.0000.02710.35
5.0.30.0000.03710.35
5.0.20.0000.02010.35
5.0.10.0030.03010.35
5.0.00.0070.03710.35
4.4.90.0000.01310.35
4.4.80.0000.01310.35
4.4.70.0000.01310.35
4.4.60.0030.01010.35
4.4.50.0030.01010.35
4.4.40.0030.02010.35
4.4.30.0000.01310.35
4.4.20.0030.01310.35
4.4.10.0000.01310.35
4.4.00.0000.02710.35
4.3.110.0000.02010.35
4.3.100.0000.01710.35
4.3.90.0000.01710.35
4.3.80.0000.03310.35
4.3.70.0030.02010.35
4.3.60.0030.02010.35
4.3.50.0000.02010.35
4.3.40.0000.04010.35
4.3.30.0000.02010.35
4.3.20.0070.02310.35
4.3.10.0000.01310.35
4.3.00.0000.01310.35

preferences:
52.79 ms | 401 KiB | 5 Q