3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Singleton { final public static function getInstance() { static $instance; if (!isset(static::$instance)) { static $instance; static::$instance = new static; } return static::$instance; } } abstract class Abudabia { use Singleton; } abstract class Mozambik { use Singleton; } class a1 extends Abudabia { public function set() { return 'allah ahbar'; } } class a2 extends Mozambik { public function get() { return 'algazira'; } } $a = a1::getInstance(); $b = a2::getInstance(); var_dump($a->set(),$b->get());

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.00718.68
8.3.50.0100.01222.06
8.3.40.0070.01018.76
8.3.30.0120.00318.70
8.3.20.0070.00020.22
8.3.10.0080.00023.66
8.3.00.0100.00017.50
8.2.180.0090.00616.88
8.2.170.0110.00322.96
8.2.160.0170.00319.34
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00626.16
8.2.120.0040.00422.08
8.2.110.0090.00022.08
8.2.100.0040.00818.22
8.2.90.0030.00519.05
8.2.80.0030.00517.97
8.2.70.0080.00317.13
8.2.60.0030.00617.93
8.2.50.0030.00618.07
8.2.40.0030.00519.95
8.2.30.0000.00718.13
8.2.20.0080.00017.81
8.2.10.0040.00417.94
8.2.00.0030.00519.55
8.1.280.0100.01025.92
8.1.270.0050.00323.96
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00322.52
8.1.230.0110.00019.15
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0070.00317.35
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0030.00618.59
8.1.160.0000.00721.96
8.1.150.0060.00618.78
8.1.140.0070.00017.46
8.1.130.0000.00717.83
8.1.120.0040.00317.40
8.1.110.0050.00317.45
8.1.100.0040.00417.45
8.1.90.0040.00417.42
8.1.80.0070.00017.48
8.1.70.0000.00717.46
8.1.60.0050.00517.51
8.1.50.0050.00317.54
8.1.40.0020.00517.54
8.1.30.0040.00417.71
8.1.20.0030.00617.49
8.1.10.0000.00717.48
8.1.00.0060.00317.45
8.0.300.0090.00018.77
8.0.290.0040.00416.75
8.0.280.0000.00718.45
8.0.270.0000.00717.23
8.0.260.0070.00017.21
8.0.250.0000.00716.98
8.0.240.0000.00817.07
8.0.230.0000.00716.99
8.0.220.0040.00416.97
8.0.210.0000.00716.96
8.0.200.0070.00016.86
8.0.190.0080.00016.92
8.0.180.0050.00216.97
8.0.170.0030.00616.95
8.0.160.0030.00316.92
8.0.150.0040.00716.83
8.0.140.0000.00816.91
8.0.130.0060.00013.45
8.0.120.0040.00416.94
8.0.110.0040.00416.94
8.0.100.0050.00217.03
8.0.90.0070.00017.02
8.0.80.0060.01516.95
8.0.70.0070.00017.00
8.0.60.0050.00317.02
8.0.50.0000.00716.86
8.0.30.0120.01017.16
8.0.20.0130.00817.40
8.0.10.0040.00417.04
8.0.00.0140.00616.87
7.4.330.0000.00515.12
7.4.320.0070.00016.43
7.4.300.0060.00016.58
7.4.290.0030.00316.52
7.4.280.0000.00716.51
7.4.270.0060.00016.63
7.4.260.0070.00016.49
7.4.250.0070.00016.56
7.4.240.0030.00316.57
7.4.230.0030.00316.39
7.4.220.0070.01116.47
7.4.210.0100.00316.70
7.4.200.0000.00716.50
7.4.160.0100.00616.55
7.4.150.0100.00717.40
7.4.140.0080.01317.86
7.4.130.0100.01016.44
7.4.120.0080.00916.50
7.4.110.0070.01016.64
7.4.100.0100.00716.55
7.4.90.0060.01116.49
7.4.80.0070.01019.39
7.4.70.0110.00616.52
7.4.60.0110.00616.66
7.4.50.0000.00416.43
7.4.40.0030.01416.59
7.4.30.0090.00916.50
7.4.00.0060.00815.12
7.3.330.0050.00013.23
7.3.320.0020.00213.38
7.3.310.0030.00616.21
7.3.300.0000.00716.32
7.3.290.0110.00316.42
7.3.280.0060.01116.34
7.3.270.0100.01017.40
7.3.260.0110.00716.34
7.3.250.0130.00816.40
7.3.240.0060.00916.30
7.3.230.0110.00516.39
7.3.210.0090.00916.40
7.3.200.0070.01319.39
7.3.190.0040.01816.45
7.3.180.0100.01016.60
7.3.170.0080.00816.42
7.3.160.0090.00616.49
7.3.120.0070.01114.85
7.3.110.0090.00914.88
7.3.100.0150.00314.58
7.3.90.0060.00614.58
7.3.80.0030.00615.10
7.3.70.0040.00414.81
7.3.60.0000.01514.78
7.3.50.0030.00714.63
7.3.40.0080.00414.73
7.3.30.0030.01414.86
7.3.20.0100.01016.42
7.3.10.0070.01016.77
7.3.00.0090.00616.69
7.2.330.0070.01516.48
7.2.320.0130.00316.73
7.2.310.0000.01816.25
7.2.300.0090.00916.54
7.2.290.0110.01116.57
7.2.250.0130.00714.97
7.2.240.0070.01315.27
7.2.230.0040.01114.72
7.2.220.0090.00315.04
7.2.210.0060.00614.95
7.2.200.0090.00614.98
7.2.190.0060.00815.00
7.2.180.0050.00515.14
7.2.170.0090.00914.91
7.2.60.0110.00416.73
7.2.00.0030.00719.50
7.1.330.0000.01015.96
7.1.320.0000.00915.82
7.1.310.0060.00315.43
7.1.300.0070.00715.71
7.1.290.0050.00315.42
7.1.280.0080.00815.74
7.1.270.0030.01415.71
7.1.260.0040.01215.63
7.1.200.0060.00315.48
7.1.100.0030.00917.97
7.1.70.0040.01516.76
7.1.60.0030.02119.32
7.1.50.0140.00716.78
7.1.00.0030.07722.41
7.0.200.0000.00816.88
7.0.140.0030.07321.92
7.0.60.0070.03719.87
7.0.50.0070.04717.87
7.0.40.0100.07020.16
7.0.30.0600.06720.06
7.0.20.0130.04320.06
7.0.10.0200.07020.33
7.0.00.0130.06720.10
5.6.280.0100.06720.79
5.6.210.0030.05020.54
5.6.200.0030.05018.16
5.6.190.0070.08720.57
5.6.180.0430.07320.57
5.6.170.0430.07020.50
5.6.160.0130.07020.39
5.6.150.0000.08718.22
5.6.140.0100.07718.21
5.6.130.0100.06718.24
5.6.120.0130.08020.90
5.6.110.0100.07721.00
5.6.100.0170.07021.02
5.6.90.0270.04720.97
5.6.80.0030.04020.52
5.5.350.0170.03320.41
5.5.340.0070.08017.94
5.5.330.0070.05320.31
5.5.320.0430.06720.21
5.5.310.0330.07720.30
5.5.300.0070.05017.93
5.5.290.0100.05718.11
5.5.280.0030.09020.67
5.5.270.0100.04320.95
5.5.260.0100.05320.64
5.5.250.0100.08320.70
5.5.240.0230.07720.17
5.4.450.0230.04319.31
5.4.440.0400.04719.20
5.4.430.0400.03019.34
5.4.420.0630.00019.43
5.4.410.0700.00019.35
5.4.400.0670.00019.22
5.4.390.0670.00019.26
5.4.380.0670.00019.09
5.4.370.0600.00018.98
5.4.360.0670.00019.26
5.4.350.0770.00019.11
5.4.340.0030.03612.02
5.4.320.0100.03512.51
5.4.310.0070.04112.51
5.4.300.0080.04612.51
5.4.290.0050.03812.51
5.4.280.0030.03712.40
5.4.270.0070.03612.40
5.4.260.0100.03412.40
5.4.250.0040.03812.40
5.4.240.0070.03412.40
5.4.230.0060.03712.39
5.4.220.0040.04112.39
5.4.210.0080.03512.40
5.4.200.0070.04212.39
5.4.190.0030.04212.39
5.4.180.0070.03512.39
5.4.170.0070.03612.40
5.4.160.0030.03912.40
5.4.150.0060.03512.39
5.4.140.0070.03612.07
5.4.130.0060.03512.07
5.4.120.0060.03712.02
5.4.110.0050.03712.02
5.4.100.0090.03912.02
5.4.90.0040.03812.02
5.4.80.0040.04112.02
5.4.70.0060.04212.02
5.4.60.0040.04112.02
5.4.50.0010.04112.02
5.4.40.0050.03512.01
5.4.30.0070.03312.00
5.4.20.0070.03512.00
5.4.10.0050.03812.00
5.4.00.0040.03811.49
5.3.290.0060.04012.80
5.3.280.0060.03912.71
5.3.270.0080.03812.73
5.3.260.0050.03912.72
5.3.250.0090.03912.71
5.3.240.0060.04512.72
5.3.230.0090.04012.71
5.3.220.0120.03512.68
5.3.210.0050.04212.68
5.3.200.0080.03612.68
5.3.190.0080.03712.67
5.3.180.0060.03712.67
5.3.170.0050.04612.66
5.3.160.0050.04212.67
5.3.150.0050.04212.67
5.3.140.0080.03412.66
5.3.130.0050.04312.66
5.3.120.0070.03812.66
5.3.110.0050.03912.66
5.3.100.0070.04012.12
5.3.90.0060.03912.08
5.3.80.0080.03812.07
5.3.70.0040.03912.07
5.3.60.0080.03612.06
5.3.50.0040.03912.00
5.3.40.0070.03512.00
5.3.30.0040.03711.95
5.3.20.0040.03811.73
5.3.10.0060.03511.70
5.3.00.0070.03511.68
5.2.170.0040.0319.18
5.2.160.0070.0279.18
5.2.150.0050.0319.18
5.2.140.0030.0379.18
5.2.130.0040.0349.14
5.2.120.0020.0309.14
5.2.110.0070.0269.15
5.2.100.0050.0329.14
5.2.90.0030.0359.14
5.2.80.0020.0339.14
5.2.70.0050.0309.14
5.2.60.0050.0329.09
5.2.50.0060.0309.06
5.2.40.0050.0319.04
5.2.30.0050.0329.01
5.2.20.0030.0319.00
5.2.10.0040.0318.92
5.2.00.0060.0278.79
5.1.60.0050.0228.07
5.1.50.0080.0248.06
5.1.40.0050.0278.04
5.1.30.0050.0278.40
5.1.20.0050.0288.42
5.1.10.0020.0278.14
5.1.00.0040.0268.14
5.0.50.0050.0196.62
5.0.40.0030.0196.48
5.0.30.0030.0346.29
5.0.20.0020.0206.26
5.0.10.0020.0206.24
5.0.00.0030.0326.23
4.4.90.0000.0204.78
4.4.80.0040.0164.75
4.4.70.0020.0184.75
4.4.60.0050.0164.75
4.4.50.0050.0144.77
4.4.40.0050.0254.71
4.4.30.0010.0174.76
4.4.20.0030.0154.84
4.4.10.0040.0154.85
4.4.00.0040.0244.76
4.3.110.0030.0164.67
4.3.100.0030.0154.66
4.3.90.0030.0144.63
4.3.80.0030.0294.59
4.3.70.0030.0144.63
4.3.60.0040.0154.62
4.3.50.0050.0164.63
4.3.40.0020.0254.54
4.3.30.0000.0183.28
4.3.20.0020.0163.26
4.3.10.0040.0143.22
4.3.00.0070.01310.38

preferences:
48.39 ms | 401 KiB | 5 Q