3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(){ return [1,2,3]; } var_dump(test()[0]); abstract class T { static public $instanses; final private function __construct(){ } public static function getInstance() { var_dump(static::$instanses); if (!(static::$instanses instanceof static)) { static::$instanses = new static; } var_dump(static::$instanses); 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.70.0110.01116.75
8.3.60.0160.00318.43
8.3.50.0100.01121.12
8.3.40.0000.01518.65
8.3.30.0030.01718.88
8.3.20.0050.00320.16
8.3.10.0080.00023.42
8.3.00.0080.00022.46
8.2.180.0150.00716.62
8.2.170.0040.01122.96
8.2.160.0100.00321.83
8.2.150.0040.00724.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00417.63
8.2.110.0150.00622.07
8.2.100.0040.00817.97
8.2.90.0000.00819.17
8.2.80.0040.00419.30
8.2.70.0000.00917.63
8.2.60.0000.00818.05
8.2.50.0080.00018.07
8.2.40.0050.00321.05
8.2.30.0040.00418.02
8.2.20.0040.00417.87
8.2.10.0040.00418.12
8.2.00.0040.00418.14
8.1.280.0040.01125.92
8.1.270.0040.00420.25
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.96
8.1.230.0060.00617.89
8.1.220.0050.00317.77
8.1.210.0030.00518.77
8.1.200.0030.00717.36
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0030.00618.61
8.1.160.0030.00622.04
8.1.150.0050.00318.90
8.1.140.0050.00317.46
8.1.130.0060.00317.77
8.1.120.0020.00517.42
8.1.110.0040.00417.49
8.1.100.0000.00817.52
8.1.90.0000.00717.49
8.1.80.0000.00817.45
8.1.70.0040.00417.43
8.1.60.0040.00417.54
8.1.50.0060.00317.53
8.1.40.0040.00417.57
8.1.30.0000.00817.68
8.1.20.0000.00717.62
8.1.10.0000.00717.47
8.1.00.0060.00317.55
8.0.300.0000.00718.77
8.0.290.0080.00016.75
8.0.280.0000.00718.46
8.0.270.0040.00417.20
8.0.260.0000.00717.26
8.0.250.0080.00016.93
8.0.240.0080.00017.05
8.0.230.0030.00317.05
8.0.220.0000.00716.86
8.0.210.0050.00216.86
8.0.200.0060.00017.02
8.0.190.0030.00617.07
8.0.180.0030.00616.95
8.0.170.0030.00617.03
8.0.160.0000.00816.89
8.0.150.0040.00316.92
8.0.140.0050.00316.90
8.0.130.0040.00413.39
8.0.120.0000.00816.87
8.0.110.0040.00416.98
8.0.100.0070.00017.03
8.0.90.0070.00016.82
8.0.80.0040.01116.86
8.0.70.0050.00217.04
8.0.60.0000.00716.77
8.0.50.0030.00516.87
8.0.30.0060.01117.21
8.0.20.0120.00617.40
8.0.10.0040.00417.13
8.0.00.0060.01216.88
7.4.330.0000.00515.08
7.4.320.0060.00016.61
7.4.300.0030.00316.44
7.4.290.0070.00016.52
7.4.280.0000.00716.48
7.4.270.0000.00716.52
7.4.260.0030.00516.48
7.4.250.0000.00716.48
7.4.240.0020.00516.55
7.4.230.0040.00416.57
7.4.220.0060.01216.61
7.4.210.0130.00716.69
7.4.200.0030.00316.44
7.4.160.0110.00416.71
7.4.150.0140.00317.40
7.4.140.0150.00917.86
7.4.130.0090.00916.51
7.4.120.0050.01216.71
7.4.110.0030.01416.61
7.4.100.0140.00316.63
7.4.90.0000.01716.56
7.4.80.0130.00519.39
7.4.70.0120.00516.66
7.4.60.0130.00416.83
7.4.50.0040.00416.30
7.4.40.0100.00616.63
7.4.30.0120.00916.40
7.4.00.0080.00814.91
7.3.330.0050.00013.30
7.3.320.0000.00613.30
7.3.310.0040.00416.43
7.3.300.0070.00016.31
7.3.290.0030.00316.31
7.3.280.0090.00616.38
7.3.270.0120.00617.40
7.3.260.0030.01516.44
7.3.250.0090.00916.42
7.3.240.0110.00516.44
7.3.230.0080.01216.52
7.3.210.0030.01516.51
7.3.200.0090.00919.39
7.3.190.0120.00416.60
7.3.180.0120.00916.43
7.3.170.0110.00716.34
7.3.160.0110.01416.47
7.3.120.0110.01114.61
7.3.110.0070.00714.98
7.3.100.0040.01114.84
7.3.90.0040.00414.58
7.3.80.0070.01314.84
7.3.70.0000.01214.89
7.3.60.0040.01114.89
7.3.50.0120.00314.82
7.3.40.0030.01014.79
7.3.30.0060.01214.90
7.3.20.0040.01416.38
7.3.10.0140.00416.83
7.3.00.0080.00816.78
7.2.330.0120.00616.69
7.2.320.0090.00916.65
7.2.310.0150.00916.89
7.2.300.0130.00616.74
7.2.290.0140.00316.57
7.2.250.0040.01515.21
7.2.240.0040.01814.78
7.2.230.0040.01415.27
7.2.220.0030.01314.79
7.2.210.0070.00715.21
7.2.200.0030.01314.85
7.2.190.0030.01014.80
7.2.180.0120.00614.89
7.2.170.0030.01615.18
7.2.60.0070.00717.07
7.2.00.0090.00319.40
7.1.330.0030.01015.54
7.1.320.0030.00815.83
7.1.310.0070.01016.00
7.1.300.0160.00015.86
7.1.290.0060.00915.88
7.1.280.0030.01315.82
7.1.270.0000.01215.84
7.1.260.0000.01415.53
7.1.200.0060.00315.85
7.1.100.0000.01318.00
7.1.70.0000.00917.25
7.1.60.0000.02520.03
7.1.50.0110.00416.95
7.1.00.0030.07722.52
7.0.200.0400.00714.97
7.0.60.0130.07719.82
7.0.50.0030.05717.86
7.0.40.0030.09720.24
7.0.30.0300.07720.14
7.0.20.0330.07320.07
7.0.10.0170.08020.16
7.0.00.0170.07320.12
5.6.280.0030.07321.15
5.6.210.0000.04320.47
5.6.200.0100.06018.29
5.6.190.0100.06020.46
5.6.180.0370.03720.53
5.6.170.0200.05720.51
5.6.160.0100.04020.45
5.6.150.0100.03718.27
5.6.140.0070.06018.15
5.6.130.0130.07718.15
5.6.120.0130.04321.10
5.6.110.0270.07021.14
5.6.100.0100.03721.10
5.6.90.0070.07021.11
5.6.80.0000.04320.44
5.5.350.0030.04020.45
5.5.340.0030.06018.04
5.5.330.0100.05020.38
5.5.320.0070.08020.33
5.5.310.0230.03320.23
5.5.300.0000.04318.05
5.5.290.0070.06717.95
5.5.280.0070.09020.77
5.5.270.0100.08020.69
5.5.260.0070.03720.97
5.5.250.0070.08320.55
5.5.240.0300.06020.27
5.4.450.0700.05719.70
5.4.440.0870.07019.58
5.4.430.0570.05319.61
5.4.420.0630.05719.45
5.4.410.0670.06719.28
5.4.400.0670.04319.07
5.4.390.0670.05319.22
5.4.380.0600.05719.06
5.4.370.0600.04719.14
5.4.360.0530.05718.84
5.4.350.0730.05019.20
5.4.340.0670.05319.13
5.4.320.0600.04718.86
5.4.310.0600.04719.15
5.4.300.0730.05019.26
5.4.290.0570.06719.37
5.4.280.0600.05319.01
5.4.270.0600.06019.28
5.4.260.0570.05319.22
5.4.250.0600.05319.05
5.4.240.0470.06319.14
5.4.230.0670.06019.14
5.4.220.0730.06719.21
5.4.210.0570.05719.34
5.4.200.0730.06716.87
5.4.190.0630.06318.87
5.4.180.0670.04018.92
5.4.170.0570.06019.00
5.4.160.0630.05019.17
5.4.150.0570.06018.99
5.4.140.0730.04716.38
5.4.130.0530.05016.78
5.4.120.0630.06016.43
5.4.110.0630.04716.49
5.4.100.0700.04716.49
5.4.90.0730.04316.55
5.4.80.0670.04716.44
5.4.70.0530.06316.57
5.4.60.0000.06316.53
5.4.50.0030.04716.53
5.4.40.0200.05016.48
5.4.30.0370.06016.43
5.4.20.0230.03716.43

preferences:
49.4 ms | 401 KiB | 5 Q