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.0140.00416.75
8.3.50.0140.00717.92
8.3.40.0140.00018.67
8.3.30.0070.00718.71
8.3.20.0040.00420.35
8.3.10.0050.00323.72
8.3.00.0000.00819.38
8.2.180.0090.01318.29
8.2.170.0120.00622.96
8.2.160.0100.00320.34
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0030.00619.19
8.2.120.0040.00426.35
8.2.110.0090.00020.94
8.2.100.0070.00417.80
8.2.90.0040.00419.22
8.2.80.0110.00017.97
8.2.70.0050.00317.25
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0040.00419.32
8.2.30.0070.00020.59
8.2.20.0040.00417.57
8.2.10.0040.00418.07
8.2.00.0040.00418.01
8.1.280.0030.01425.92
8.1.270.0070.00323.96
8.1.260.0000.00728.09
8.1.250.0050.00328.09
8.1.240.0030.00620.93
8.1.230.0070.00417.66
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0080.00017.25
8.1.180.0000.00718.10
8.1.170.0040.00418.63
8.1.160.0000.00722.01
8.1.150.0040.00418.86
8.1.140.0000.00819.41
8.1.130.0040.00417.70
8.1.120.0030.00317.35
8.1.110.0030.00317.25
8.1.100.0000.00717.29
8.1.90.0040.00417.32
8.1.80.0040.00417.39
8.1.70.0070.00017.32
8.1.60.0050.00317.49
8.1.50.0030.00717.57
8.1.40.0030.00617.55
8.1.30.0070.00417.71
8.1.20.0000.00717.55
8.1.10.0080.00017.60
8.1.00.0040.00717.39
8.0.300.0070.00018.77
8.0.290.0000.00716.75
8.0.280.0030.00318.40
8.0.270.0040.00417.13
8.0.260.0030.00317.24
8.0.250.0030.00516.89
8.0.240.0080.00016.89
8.0.230.0000.00716.93
8.0.220.0030.00316.92
8.0.210.0040.00416.84
8.0.200.0000.00716.96
8.0.190.0080.00016.99
8.0.180.0050.00316.76
8.0.170.0040.00416.83
8.0.160.0050.00316.83
8.0.150.0040.00416.75
8.0.140.0000.00816.86
8.0.130.0040.00413.30
8.0.120.0050.00316.83
8.0.110.0040.00416.79
8.0.100.0000.00816.95
8.0.90.0080.00016.69
8.0.80.0070.00716.96
8.0.70.0050.00316.76
8.0.60.0000.00716.79
8.0.50.0000.00716.77
8.0.30.0130.00817.21
8.0.20.0090.01017.40
8.0.10.0050.00317.02
8.0.00.0080.01116.93
7.4.330.0050.00016.67
7.4.320.0000.00616.59
7.4.300.0030.00316.61
7.4.290.0020.00516.63
7.4.280.0040.00416.47
7.4.270.0030.00316.55
7.4.260.0080.00016.61
7.4.250.0040.00416.47
7.4.240.0020.00516.52
7.4.230.0070.00016.73
7.4.220.0060.01216.64
7.4.210.0060.01016.58
7.4.200.0070.00016.61
7.4.160.0090.00616.44
7.4.150.0100.00717.40
7.4.140.0140.00617.86
7.4.130.0120.00716.61
7.4.120.0100.00716.67
7.4.110.0090.00916.58
7.4.100.0110.01116.43
7.4.90.0000.01716.39
7.4.80.0100.00719.39
7.4.70.0060.00916.72
7.4.60.0160.00016.44
7.4.50.0160.00016.58
7.4.40.0100.00716.58
7.4.30.0160.00816.47
7.4.10.0070.01115.15
7.4.00.0060.01114.96
7.3.330.0000.00713.27
7.3.320.0030.00313.39
7.3.310.0040.00416.30
7.3.300.0070.00016.15
7.3.290.0070.00016.19
7.3.280.0090.01016.32
7.3.270.0090.00917.40
7.3.260.0090.00916.29
7.3.250.0130.00516.42
7.3.240.0120.00616.49
7.3.230.0160.00016.39
7.3.210.0130.00916.36
7.3.200.0090.00616.27
7.3.190.0030.01716.24
7.3.180.0140.00316.36
7.3.170.0110.00716.34
7.3.160.0060.01016.29
7.3.130.0070.01114.79
7.3.120.0090.00814.61
7.3.110.0060.00814.75
7.3.100.0100.00514.70
7.3.90.0050.01014.80
7.3.80.0020.01114.75
7.3.70.0070.00714.75
7.3.60.0050.01014.70
7.3.50.0060.00814.82
7.3.40.0060.00614.73
7.3.30.0070.00514.73
7.3.20.0000.01216.54
7.3.10.0040.01016.54
7.3.00.0090.00516.62
7.2.330.0090.00916.34
7.2.320.0140.00916.38
7.2.310.0030.01416.56
7.2.300.0100.00716.76
7.2.290.0070.01116.40
7.2.260.0100.01014.88
7.2.250.0090.00815.05
7.2.240.0060.00914.97
7.2.230.0040.01015.02
7.2.220.0030.00814.79
7.2.210.0060.00914.86
7.2.200.0030.00914.98
7.2.190.0090.00715.02
7.2.180.0070.00915.11
7.2.170.0080.00615.02
7.2.160.0080.00814.90
7.2.150.0030.00616.68
7.2.140.0040.01416.90
7.2.130.0070.00616.79
7.2.120.0080.00716.82
7.2.110.0080.00516.82
7.2.100.0080.00316.68
7.2.90.0060.00816.85
7.2.80.0020.01216.88
7.2.70.0070.00716.88
7.2.60.0070.00816.79
7.2.50.0100.00316.72
7.2.40.0050.01116.79
7.2.30.0060.00916.95
7.2.20.0060.00616.77
7.2.10.0080.00316.77
7.2.00.0060.00717.63
7.1.330.0050.00615.64
7.1.320.0070.00715.78
7.1.310.0050.00915.73
7.1.300.0060.00715.73
7.1.290.0090.00415.88
7.1.280.0060.00915.63
7.1.270.0020.01015.68
7.1.260.0070.01015.48
7.1.250.0080.00415.86
7.1.240.0050.00515.88
7.1.230.0030.01015.79
7.1.220.0150.00015.72
7.1.210.0030.01015.70
7.1.200.0000.01215.77
7.1.190.0060.00315.66
7.1.180.0030.01015.73
7.1.170.0110.00015.43
7.1.160.0060.00915.52
7.1.150.0060.00615.61
7.1.140.0030.00915.88
7.1.130.0000.01715.64
7.1.120.0030.01315.73
7.1.110.0000.01215.80
7.1.100.0020.01016.93
7.1.90.0000.01015.50
7.1.80.0070.00315.68
7.1.70.0050.00616.46
7.1.60.0070.01217.60
7.1.50.0130.00525.13
7.1.40.0060.00615.73
7.1.30.0070.00715.78
7.1.20.0040.00715.47
7.1.10.0090.00315.70
7.1.00.0080.03518.98
7.0.330.0100.00015.45
7.0.320.0070.00715.28
7.0.310.0070.00315.19
7.0.300.0030.00914.96
7.0.290.0060.00315.23
7.0.280.0080.00415.29
7.0.270.0000.01215.11
7.0.260.0090.00615.50
7.0.250.0000.01015.05
7.0.240.0070.01015.31
7.0.230.0060.00615.21
7.0.220.0070.00715.34
7.0.210.0070.00415.37
7.0.200.0440.00315.13
7.0.190.0090.00615.23
7.0.180.0070.01115.41
7.0.170.0070.00515.29
7.0.160.0040.00815.15
7.0.150.0090.00315.49
7.0.140.0070.00715.41
7.0.130.0030.00915.21
7.0.120.0030.01015.42
7.0.110.0040.00415.27
7.0.100.0030.01015.46
7.0.90.0000.01315.50
7.0.80.0100.00315.58
7.0.70.0060.00615.32
7.0.60.0080.04217.52
7.0.50.0120.03816.49
7.0.40.0130.04516.88
7.0.30.0120.02616.90
7.0.20.0120.02516.88
7.0.10.0070.02316.86
7.0.00.0040.02516.87
5.6.400.0070.00714.28
5.6.390.0040.00814.07
5.6.380.0060.00314.66
5.6.370.0060.00614.05
5.6.360.0100.00614.26
5.6.350.0060.00614.21
5.6.340.0070.00714.34
5.6.330.0060.00613.86
5.6.320.0080.00514.13
5.6.310.0070.01014.09
5.6.300.0030.01113.80
5.6.290.0100.00313.91
5.6.280.0080.03717.62
5.6.270.0030.00614.48
5.6.260.0110.00014.22
5.6.250.0060.01214.08
5.6.240.0030.00914.50
5.6.230.0100.00014.52
5.6.220.0030.01013.98
5.6.210.0050.04517.52
5.6.200.0060.03116.23
5.6.190.0050.02917.34
5.6.180.1980.02817.46
5.6.170.0180.03817.37
5.6.160.0100.02717.49
5.6.150.0030.02316.10
5.6.140.0030.02616.16
5.6.130.0100.03116.25
5.6.120.0070.04717.85
5.6.110.0060.04517.81
5.6.100.0090.02917.70
5.6.90.0070.04617.54
5.6.80.0030.04817.27
5.6.70.0060.01214.09
5.6.60.0090.00313.98
5.6.50.0110.00713.87
5.6.40.0080.01114.09
5.6.30.0110.00714.22
5.6.20.0040.01714.35
5.6.10.0180.00314.07
5.6.00.0100.01314.20
5.5.380.0070.01014.25
5.5.370.0040.00414.28
5.5.360.0060.00614.11
5.5.350.0240.03717.48
5.5.340.0000.03216.13
5.5.330.0130.03817.06
5.5.320.0050.03817.27
5.5.310.0180.02217.14
5.5.300.0090.02316.13
5.5.290.0050.04316.15
5.5.280.0110.02817.44
5.5.270.0050.03517.41
5.5.260.0050.04517.29
5.5.250.0070.04617.49
5.5.240.0120.02216.99
5.5.230.0090.00313.91
5.5.220.0100.00714.06
5.5.210.0110.00313.88
5.5.200.0030.01014.14
5.5.190.0090.00614.07
5.5.180.0040.01414.20
5.5.170.0060.00313.80
5.5.160.0060.00914.12
5.5.150.0090.00613.96
5.5.140.0090.00614.20
5.5.130.0040.01113.91
5.5.120.0000.01114.18
5.5.110.0060.01013.86
5.5.100.0040.01214.01
5.5.90.0000.01313.91
5.5.80.0060.00914.31
5.5.70.0000.00914.05
5.5.60.0000.01013.89
5.5.50.0030.01314.21
5.5.40.0030.01013.85
5.5.30.0030.01313.85
5.5.20.0060.00314.14
5.5.10.0040.00413.88
5.5.00.0000.01214.12

preferences:
43.7 ms | 400 KiB | 5 Q