3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class A{ static protected $shared = array(); static function create(){ if (isset(static::$shared['mailer'])){ return static::$shared['mailer']; } $mailer = new static(); //this is the correct way return static::$shared['mailer'] = $mailer; } } class B extends A{ } $obj=B::create(); var_dump($obj);

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.0150.00416.63
8.3.50.0170.00321.97
8.3.40.0040.01118.67
8.3.30.0120.00318.52
8.3.20.0080.00018.90
8.3.10.0040.00421.89
8.3.00.0040.00423.46
8.2.180.0140.00716.50
8.2.170.0070.00722.96
8.2.160.0100.00322.30
8.2.150.0050.00324.18
8.2.140.0000.00724.66
8.2.130.0110.00419.77
8.2.120.0040.00426.35
8.2.110.0100.00022.26
8.2.100.0060.00618.22
8.2.90.0030.00719.88
8.2.80.0050.00317.97
8.2.70.0030.00517.93
8.2.60.0110.00018.21
8.2.50.0000.00818.10
8.2.40.0050.00320.36
8.2.30.0000.00919.30
8.2.20.0040.00418.04
8.2.10.0000.00718.11
8.2.00.0070.00017.59
8.1.280.0040.01125.92
8.1.270.0080.00022.17
8.1.260.0040.00428.09
8.1.250.0030.00628.09
8.1.240.0000.00822.05
8.1.230.0070.00420.91
8.1.220.0070.00317.76
8.1.210.0040.00418.77
8.1.200.0040.00817.23
8.1.190.0030.00617.41
8.1.180.0030.00518.10
8.1.170.0080.00018.52
8.1.160.0040.00423.83
8.1.150.0080.00022.09
8.1.140.0020.00519.47
8.1.130.0070.00017.60
8.1.120.0000.00717.45
8.1.110.0040.00417.29
8.1.100.0030.00517.42
8.1.90.0000.00817.42
8.1.80.0000.00817.41
8.1.70.0030.00317.41
8.1.60.0000.00817.54
8.1.50.0050.00317.58
8.1.40.0080.00017.45
8.1.30.0030.00617.65
8.1.20.0000.00717.53
8.1.10.0000.00717.47
8.1.00.0060.00317.43
8.0.300.0040.00419.50
8.0.290.0040.00416.58
8.0.280.0030.00318.39
8.0.270.0060.00317.14
8.0.260.0060.00017.11
8.0.250.0030.00316.93
8.0.240.0000.00816.93
8.0.230.0040.00416.85
8.0.220.0040.00416.71
8.0.210.0030.00316.70
8.0.200.0080.00016.81
8.0.190.0040.00416.78
8.0.180.0000.00816.85
8.0.170.0040.00416.88
8.0.160.0040.00416.86
8.0.150.0030.00316.76
8.0.140.0070.00016.74
8.0.130.0030.00313.21
8.0.120.0030.00516.80
8.0.110.0070.00016.89
8.0.100.0040.00416.60
8.0.90.0000.00716.83
8.0.80.0160.00316.73
8.0.70.0040.00416.79
8.0.60.0040.00416.83
8.0.50.0000.00716.81
8.0.30.0040.01316.95
8.0.20.0120.00917.43
8.0.10.0000.00716.99
8.0.00.0150.00616.84
7.4.330.0060.00015.55
7.4.320.0030.00316.54
7.4.300.0030.00316.48
7.4.290.0000.00616.49
7.4.280.0000.00816.63
7.4.270.0070.00016.59
7.4.260.0000.00716.41
7.4.250.0040.00416.48
7.4.240.0070.00016.57
7.4.230.0030.00316.62
7.4.220.0130.00716.42
7.4.210.0060.00916.62
7.4.200.0070.00016.60
7.4.160.0100.01116.46
7.4.150.0190.00817.40
7.4.140.0100.00817.86
7.4.130.0070.01016.51
7.4.120.0100.01016.68
7.4.110.0140.00316.44
7.4.100.0060.01016.39
7.4.90.0080.00816.41
7.4.80.0090.00919.39
7.4.70.0120.00916.41
7.4.60.0080.00816.56
7.4.50.0100.00616.54
7.4.40.0100.00716.63
7.4.30.0130.00316.59
7.4.00.0120.00515.04
7.3.330.0060.00013.38
7.3.320.0000.00513.31
7.3.310.0030.00316.40
7.3.300.0060.00016.28
7.3.290.0110.01016.40
7.3.280.0070.01016.38
7.3.270.0060.01017.40
7.3.260.0110.01116.52
7.3.250.0120.00516.51
7.3.240.0160.00716.54
7.3.230.0030.01316.48
7.3.210.0100.00616.55
7.3.200.0070.01016.57
7.3.190.0080.00816.45
7.3.180.0040.01116.61
7.3.170.0030.01516.52
7.3.160.0140.01116.32
7.3.120.0080.00514.71
7.3.110.0080.00714.87
7.3.100.0030.01014.86
7.3.90.0080.00814.69
7.3.80.0070.00814.86
7.3.70.0030.00814.66
7.3.60.0050.01214.81
7.3.50.0080.00914.83
7.3.40.0010.01214.86
7.3.30.0070.01014.61
7.3.20.0080.00816.48
7.3.10.0070.00416.72
7.3.00.0060.00816.75
7.2.330.0140.00316.59
7.2.320.0170.00616.38
7.2.310.0060.01416.61
7.2.300.0200.00316.82
7.2.290.0060.01416.51
7.2.250.0100.01015.29
7.2.240.0070.01114.74
7.2.230.0030.01015.09
7.2.220.0050.00714.82
7.2.210.0110.00515.13
7.2.200.0050.01015.04
7.2.190.0050.01014.93
7.2.180.0080.01015.16
7.2.170.0070.00614.79
7.2.160.0030.01315.09
7.2.150.0090.00617.05
7.2.140.0110.00016.79
7.2.130.0100.00717.01
7.2.120.0000.01216.83
7.2.110.0030.01016.57
7.2.100.0070.01016.93
7.2.90.0030.00917.11
7.2.80.0130.00317.09
7.2.70.0070.00716.66
7.2.60.0070.01116.87
7.2.50.0040.00816.87
7.2.40.0000.01516.94
7.2.30.0040.01116.84
7.2.20.0090.00616.93
7.2.10.0120.00416.83
7.2.00.0000.01318.18
7.1.330.0020.01415.88
7.1.320.0030.01115.84
7.1.310.0100.00515.55
7.1.300.0040.00915.62
7.1.290.0060.00815.61
7.1.280.0050.00815.85
7.1.270.0040.01115.89
7.1.260.0030.01315.47
7.1.250.0030.01215.83
7.1.70.0030.00617.29
7.1.60.0050.00517.32
7.1.00.0030.07722.42
7.0.200.0310.00314.77
7.0.120.0100.07021.96
7.0.110.0100.07722.06
7.0.100.0030.08022.12
7.0.90.0100.08322.05
7.0.80.0100.05721.98
7.0.70.0130.07722.02
7.0.60.0200.06722.08
7.0.50.0200.06322.07
7.0.40.0100.08021.99
7.0.30.0030.06722.11
7.0.20.0130.07722.05
7.0.10.0230.06022.05
7.0.00.0070.07322.10
5.6.270.0130.06721.11
5.6.260.0100.07321.04
5.6.250.0070.08321.09
5.6.240.0170.06721.03
5.6.230.0100.07720.99
5.6.220.0130.07320.78
5.6.210.0130.07720.95
5.6.200.0100.08320.84
5.6.190.0130.06720.89
5.6.180.0130.07020.76
5.6.170.0070.05720.83
5.6.160.0070.08021.01
5.6.150.0130.06720.93
5.6.140.0200.06721.00
5.6.130.0070.07720.99
5.6.120.0070.07020.85
5.6.110.0100.06720.82
5.6.100.0030.08021.05
5.6.90.0170.06720.99
5.6.80.0100.06720.45
5.6.70.0070.07020.43
5.6.60.0100.07020.41
5.6.50.0130.07720.33
5.6.40.0030.08020.16
5.6.30.0030.07020.30
5.6.20.0130.07020.34
5.6.10.0070.07320.11
5.6.00.0100.06720.17

preferences:
74.13 ms | 401 KiB | 5 Q