3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen_one_to_three() { for ($i = 1; $i <= 3; $i++) { // Note that $i is preserved between yields. yield $i; } } $generator = gen_one_to_three(); var_dump($generator); die; abstract class T { static public $instanses; final private function __construct(){ } public static function getInstance() { if (!(static::$instanses instanceof static)) { static::$instanses = new static; } return static::$instanses; } } class A extends T { static public $instanses; } class B extends A { static public $instanses; } $t = A::getInstance(); var_dump($t); $t1 = B::getInstance(); var_dump($t1); new B(); ?>

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.0070.01516.75
8.3.50.0080.01421.92
8.3.40.0090.00618.54
8.3.30.0160.00018.84
8.3.20.0070.00020.17
8.3.10.0080.00023.51
8.3.00.0040.00419.38
8.2.180.0070.00716.88
8.2.170.0080.00822.96
8.2.160.0070.00720.35
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00017.50
8.2.120.0000.00826.35
8.2.110.0030.00620.32
8.2.100.0090.00317.91
8.2.90.0000.00719.05
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0090.00317.93
8.2.50.0040.00418.07
8.2.40.0030.00519.21
8.2.30.0030.00520.70
8.2.20.0080.00017.70
8.2.10.0070.00017.99
8.2.00.0040.00418.06
8.1.280.0080.00625.92
8.1.270.0100.00022.19
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0060.00323.92
8.1.230.0080.00419.44
8.1.220.0000.00917.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.36
8.1.180.0040.00418.10
8.1.170.0040.00420.19
8.1.160.0040.00421.89
8.1.150.0070.00018.80
8.1.140.0030.00519.42
8.1.130.0000.00717.53
8.1.120.0040.00417.45
8.1.110.0060.00317.40
8.1.100.0050.00217.32
8.1.90.0030.00517.31
8.1.80.0040.00317.30
8.1.70.0030.00317.32
8.1.60.0080.00017.63
8.1.50.0040.00417.54
8.1.40.0040.00817.52
8.1.30.0050.00517.52
8.1.20.0040.00417.55
8.1.10.0060.00317.41
8.1.00.0070.00317.39
8.0.300.0040.00418.77
8.0.290.0030.00616.63
8.0.280.0070.00018.32
8.0.270.0070.00017.16
8.0.260.0000.00717.27
8.0.250.0070.00016.96
8.0.240.0080.00016.98
8.0.230.0030.00316.88
8.0.220.0070.00016.79
8.0.210.0000.00716.84
8.0.200.0030.00316.95
8.0.190.0000.00716.86
8.0.180.0070.00016.82
8.0.170.0050.00316.86
8.0.160.0040.00316.94
8.0.150.0030.00316.88
8.0.140.0000.00716.87
8.0.130.0000.00613.38
8.0.120.0040.00416.86
8.0.110.0040.00416.79
8.0.100.0040.00416.91
8.0.90.0000.00716.97
8.0.80.0100.00616.79
8.0.70.0040.00416.85
8.0.60.0080.00016.90
8.0.50.0000.00816.74
8.0.30.0060.01217.11
8.0.20.0090.02017.40
8.0.10.0080.00016.88
8.0.00.0100.01116.79
7.4.330.0000.00416.79
7.4.320.0070.00016.61
7.4.300.0030.00316.52
7.4.290.0000.00716.55
7.4.280.0050.00316.51
7.4.270.0030.00316.54
7.4.260.0070.00016.51
7.4.250.0000.00816.50
7.4.240.0040.00416.58
7.4.230.0000.00716.28
7.4.220.0120.00616.55
7.4.210.0080.00816.46
7.4.200.0070.00016.64
7.4.160.0060.00916.56
7.4.150.0150.00317.40
7.4.140.0080.01317.86
7.4.130.0100.00816.42
7.4.120.0120.00716.60
7.4.110.0090.00916.49
7.4.100.0120.01216.34
7.4.90.0140.00316.48
7.4.80.0110.01019.39
7.4.70.0110.00816.43
7.4.60.0090.00616.72
7.4.50.0050.01316.56
7.4.40.0040.01716.34
7.4.30.0030.01416.51
7.4.00.0030.01314.81
7.3.330.0000.00513.17
7.3.320.0000.00613.38
7.3.310.0000.00716.36
7.3.300.0030.00316.30
7.3.290.0090.00816.34
7.3.280.0070.01216.31
7.3.270.0060.01517.40
7.3.260.0070.01016.29
7.3.250.0110.00916.24
7.3.240.0100.01016.47
7.3.230.0060.01316.42
7.3.210.0050.01116.44
7.3.200.0110.00716.34
7.3.190.0130.00316.30
7.3.180.0140.00316.36
7.3.170.0070.01416.42
7.3.160.0170.00016.39
7.3.120.0110.00714.81
7.3.110.0040.01414.69
7.3.100.0090.00614.52
7.3.90.0070.00714.61
7.3.80.0090.00614.77
7.3.70.0070.00714.39
7.3.60.0090.00314.63
7.3.50.0060.00614.77
7.3.40.0070.00714.59
7.3.30.0090.00314.56
7.3.20.0030.01016.44
7.3.10.0070.00516.59
7.3.00.0060.00316.67
7.2.330.0090.00916.73
7.2.320.0150.00616.47
7.2.310.0100.01316.63
7.2.300.0130.01016.75
7.2.290.0120.00916.48
7.2.250.0040.00715.05
7.2.240.0070.01315.10
7.2.230.0030.01814.73
7.2.220.0040.01114.59
7.2.210.0040.00814.97
7.2.200.0000.01414.95
7.2.190.0110.00414.68
7.2.180.0040.01115.03
7.2.170.0110.00315.04
7.2.130.0040.00916.92
7.2.120.0110.00016.84
7.2.110.0100.00316.77
7.2.100.0030.00716.76
7.2.90.0080.00816.71
7.2.80.0040.00717.02
7.2.70.0090.00317.01
7.2.60.0110.00416.85
7.2.50.0060.00916.57
7.2.40.0030.00716.75
7.2.30.0040.01116.98
7.2.20.0120.00016.84
7.2.10.0030.00616.57
7.2.00.0070.01118.13
7.1.330.0090.00615.70
7.1.320.0070.00715.55
7.1.310.0030.00715.79
7.1.300.0050.00515.63
7.1.290.0000.00915.63
7.1.280.0040.00715.50
7.1.270.0040.01015.71
7.1.260.0040.00815.70
7.1.250.0050.00515.79
7.1.200.0000.01215.84
7.1.100.0030.01018.11
7.1.70.0000.00717.13
7.1.60.0160.00919.48
7.1.50.0070.01716.87
7.1.00.0130.06722.31
7.0.200.0150.00414.78
7.0.60.0070.08019.94
7.0.50.0070.08317.90
7.0.40.0100.06020.18
7.0.30.0230.05020.15
7.0.20.0200.06020.20
7.0.10.0070.04020.13
7.0.00.0200.03720.08
5.6.280.0000.06020.82
5.6.210.0030.08320.77
5.6.200.0030.07018.22
5.6.190.0070.06720.63
5.6.180.0230.08020.54
5.6.170.0270.06720.58
5.6.160.0100.07320.54
5.6.150.0070.03718.23
5.6.140.0030.04318.11
5.6.130.0000.05718.24
5.6.120.0000.04720.99
5.6.110.0070.07721.02
5.6.100.0130.08021.01
5.6.90.0130.07721.02
5.6.80.0070.08720.40
5.5.350.0100.02720.34
5.5.340.0000.08318.07
5.5.330.0000.04720.25
5.5.320.0130.04720.27
5.5.310.0200.05020.20
5.5.300.0130.07317.92
5.5.290.0070.08017.93
5.5.280.0030.08020.63
5.5.270.0370.03020.88
5.5.260.0070.07020.68
5.5.250.0030.04020.63
5.5.240.0230.08320.16

preferences:
56.91 ms | 401 KiB | 5 Q