3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Singleton { protected static $instance = null; protected function __construct() { //Thou shalt not construct that which is unconstructable! } protected function __clone() { //Me not like clones! Me smash clones! } public static function getInstance() { if (!isset(static::$instance)) { static::$instance = new static; } return static::$instance; } } class Foobar extends Singleton {}; $foo = Foobar::getInstance();

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.0100.01016.50
8.3.50.0090.00722.06
8.3.40.0060.00818.67
8.3.30.0030.01019.04
8.3.20.0030.00520.37
8.3.10.0080.00023.61
8.3.00.0100.00020.75
8.2.180.0140.00416.38
8.2.170.0070.00722.96
8.2.160.0140.00020.38
8.2.150.0070.00024.18
8.2.140.0030.00524.66
8.2.130.0000.00826.16
8.2.120.0040.00420.70
8.2.110.0030.00620.54
8.2.100.0070.00417.78
8.2.90.0050.00319.21
8.2.80.0040.00417.97
8.2.70.0000.00917.50
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0000.00818.22
8.2.30.0050.00218.13
8.2.20.0080.00017.77
8.2.10.0080.00017.94
8.2.00.0000.00717.69
8.1.280.0100.01025.92
8.1.270.0000.00823.92
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0050.00523.83
8.1.230.0090.00323.98
8.1.220.0000.00917.74
8.1.210.0030.00618.77
8.1.200.0060.00317.23
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0000.00818.47
8.1.160.0000.00722.01
8.1.150.0000.00718.63
8.1.140.0000.00717.45
8.1.130.0000.00717.84
8.1.120.0030.00317.45
8.1.110.0040.00417.44
8.1.100.0030.00317.48
8.1.90.0080.00317.48
8.1.80.0030.00517.47
8.1.70.0070.00017.33
8.1.60.0030.00517.52
8.1.50.0040.00417.52
8.1.40.0000.00817.50
8.1.30.0000.00817.63
8.1.20.0030.00617.66
8.1.10.0050.00317.60
8.1.00.0030.00617.53
8.0.300.0000.00820.64
8.0.290.0080.00016.75
8.0.280.0040.00418.37
8.0.270.0030.00317.32
8.0.260.0000.00817.30
8.0.250.0000.00716.88
8.0.240.0070.00017.03
8.0.230.0000.00716.98
8.0.220.0000.00716.89
8.0.210.0040.00416.86
8.0.200.0000.01017.00
8.0.190.0000.00716.96
8.0.180.0040.00416.93
8.0.170.0060.00316.94
8.0.160.0030.00416.77
8.0.150.0020.00516.77
8.0.140.0040.00416.74
8.0.130.0050.00013.40
8.0.120.0000.00816.89
8.0.110.0040.00416.79
8.0.100.0040.00416.71
8.0.90.0070.00016.68
8.0.80.0140.00316.87
8.0.70.0030.00516.93
8.0.60.0000.00716.94
8.0.50.0000.00816.76
8.0.30.0090.00916.84
8.0.20.0160.00917.40
8.0.10.0040.00417.08
8.0.00.0050.01316.78
7.4.330.0030.00315.00
7.4.320.0000.00616.50
7.4.300.0030.00316.50
7.4.290.0000.00716.65
7.4.280.0030.00516.57
7.4.270.0000.00716.55
7.4.260.0000.00716.58
7.4.250.0080.00016.45
7.4.240.0030.00516.60
7.4.230.0000.00716.59
7.4.220.0090.00816.63
7.4.210.0100.00616.47
7.4.200.0040.00416.60
7.4.190.0030.00316.70
7.4.160.0110.00416.46
7.4.150.0070.01117.40
7.4.140.0100.00717.86
7.4.130.0110.00816.49
7.4.120.0050.01216.44
7.4.110.0040.01416.58
7.4.100.0110.00816.43
7.4.90.0130.00316.59
7.4.80.0170.00319.39
7.4.70.0060.01016.54
7.4.60.0210.00016.35
7.4.50.0000.00416.75
7.4.40.0070.01016.57
7.4.30.0090.00616.48
7.4.00.0100.00315.13
7.3.330.0050.00013.30
7.3.320.0060.00013.17
7.3.310.0040.00416.27
7.3.300.0030.00316.35
7.3.290.0060.01316.34
7.3.280.0070.01116.29
7.3.270.0140.00417.40
7.3.260.0120.00616.54
7.3.250.0080.00916.49
7.3.240.0100.00716.46
7.3.230.0130.01016.39
7.3.210.0100.00716.19
7.3.200.0100.00619.39
7.3.190.0100.01316.39
7.3.180.0140.00316.52
7.3.170.0030.01316.50
7.3.160.0140.00916.39
7.3.120.0100.00314.93
7.3.10.0070.00716.69
7.3.00.0070.00716.63
7.2.330.0100.00616.71
7.2.320.0090.00916.48
7.2.310.0100.01016.77
7.2.300.0120.00416.82
7.2.290.0070.01116.88
7.2.130.0070.00316.83
7.2.120.0040.01216.96
7.2.110.0060.00617.06
7.2.100.0000.01716.82
7.2.90.0120.00317.08
7.2.80.0030.01216.72
7.2.70.0060.00917.07
7.2.60.0090.00017.15
7.2.50.0030.00916.52
7.2.40.0080.00816.77
7.2.30.0060.00616.72
7.2.20.0070.00716.63
7.2.10.0120.00316.93
7.2.00.0030.01218.05
7.1.250.0030.00715.49
7.1.100.0040.00417.86
7.1.70.0000.00716.90
7.1.60.0100.01319.70
7.1.50.0170.01316.46
7.1.00.0100.06722.35
7.0.200.0000.00716.53
7.0.140.0030.07021.95
7.0.60.0100.08019.95
7.0.50.0000.04717.86
7.0.40.0170.07720.02
7.0.30.0230.08020.16
7.0.20.0300.06320.01
7.0.10.0270.07320.16
7.0.00.0070.04320.08
5.6.280.0030.07321.07
5.6.210.0070.03720.47
5.6.200.0030.04018.29
5.6.190.0200.07320.50
5.6.180.3230.04020.59
5.6.170.0200.05020.60
5.6.160.0100.07320.46
5.6.150.0100.07718.18
5.6.140.0170.06318.17
5.6.130.0070.07018.25
5.6.120.0000.08321.11
5.6.110.0030.07720.98
5.6.100.0000.05721.11
5.6.90.0070.04020.95
5.6.80.0070.03320.39
5.6.70.0330.05320.37
5.5.350.0130.08020.40
5.5.340.0030.07718.09
5.5.330.0170.07020.40
5.5.320.0430.07020.20
5.5.310.0230.04020.34
5.5.300.0100.08317.98
5.5.290.0000.08718.04
5.5.280.0130.07720.65
5.5.270.0030.04320.76
5.5.260.0100.08320.77
5.5.250.0030.05720.71
5.5.240.0070.08320.35
5.4.450.0030.08319.31
5.4.440.0870.06019.30
5.4.430.0930.06319.39
5.4.420.0670.00019.38
5.4.410.0200.04318.98
5.4.400.0130.06018.67
5.4.390.0200.06018.50
5.4.380.0200.04718.80
5.4.370.0330.04718.68
5.4.360.0230.05018.55
5.4.350.0150.04812.02
5.4.340.0160.04712.02
5.4.320.0060.03912.50
5.4.310.0020.04212.50
5.4.300.0060.04012.50
5.4.290.0070.04312.50
5.4.280.0070.04112.39
5.4.270.0050.04112.39
5.4.260.0090.03812.39
5.4.250.0060.04012.39
5.4.240.0070.03912.39
5.4.230.0100.03712.38
5.4.220.0040.03912.38
5.4.210.0110.04812.39
5.4.200.0070.05512.38
5.4.190.0110.07312.38
5.4.180.0100.05012.38
5.4.170.0090.04812.39
5.4.160.0100.04812.39
5.4.150.0070.03912.39
5.4.140.0070.05312.07
5.4.130.0060.04512.06
5.4.120.0070.03512.02
5.4.110.0030.03912.01
5.4.100.0070.03412.01
5.4.90.0040.04512.02
5.4.80.0060.04112.01
5.4.70.0050.03612.01
5.4.60.0040.03812.01
5.4.50.0010.04112.01
5.4.40.0060.03612.00
5.4.30.0080.03512.00
5.4.20.0040.03812.00
5.4.10.0050.03712.00
5.4.00.0060.04811.48
5.3.290.0070.04012.80
5.3.280.0100.04712.70
5.3.270.0130.06112.72
5.3.260.0090.06312.72
5.3.250.0100.05312.72
5.3.240.0130.06112.72
5.3.230.0090.05312.71
5.3.220.0070.04512.68
5.3.210.0080.04412.68
5.3.200.0080.03912.68
5.3.190.0050.04612.68
5.3.180.0100.03912.67
5.3.170.0050.03812.67
5.3.160.0090.03512.67
5.3.150.0060.03712.68
5.3.140.0030.03912.66
5.3.130.0050.03912.66
5.3.120.0050.03912.65
5.3.110.0030.04112.66
5.3.100.0070.04112.12
5.3.90.0070.03712.11
5.3.80.0040.05012.10
5.3.70.0080.04912.10
5.3.60.0070.04812.08
5.3.50.0070.03612.02
5.3.40.0090.03812.02
5.3.30.0050.03711.98
5.3.20.0090.03611.77
5.3.10.0090.04911.73
5.3.00.0110.04511.72
5.2.170.0090.0279.23
5.2.160.0050.0369.23
5.2.150.0060.0389.22
5.2.140.0030.0339.22
5.2.130.0050.0299.18
5.2.120.0040.0379.18
5.2.110.0030.0319.19
5.2.100.0050.0289.18
5.2.90.0020.0329.18
5.2.80.0070.0289.18
5.2.70.0050.0309.18
5.2.60.0060.0289.13
5.2.50.0060.0299.10
5.2.40.0040.0309.07
5.2.30.0040.0309.05
5.2.20.0070.0269.04
5.2.10.0040.0318.95
5.2.00.0070.0268.81
5.1.60.0040.0248.10
5.1.50.0020.0278.09
5.1.40.0020.0258.07
5.1.30.0060.0248.43
5.1.20.0080.0228.44
5.1.10.0060.0248.16
5.1.00.0050.0248.17
5.0.50.0030.0216.64
5.0.40.0040.0206.51
5.0.30.0030.0326.32
5.0.20.0030.0206.28
5.0.10.0040.0206.26
5.0.00.0020.0326.26
4.4.90.0040.0144.78
4.4.80.0030.0164.76
4.4.70.0020.0174.75
4.4.60.0030.0164.75
4.4.50.0020.0164.77
4.4.40.0030.0254.71
4.4.30.0020.0154.76
4.4.20.0010.0174.84
4.4.10.0030.0154.84
4.4.00.0020.0254.76
4.3.110.0040.0154.67
4.3.100.0040.0154.67
4.3.90.0050.0134.64
4.3.80.0060.0234.58
4.3.70.0040.0134.63
4.3.60.0030.0144.63
4.3.50.0020.0174.63
4.3.40.0050.0244.54
4.3.30.0020.0183.30
4.3.20.0020.0183.28
4.3.10.0030.0203.23
4.3.00.0100.0236.51

preferences:
47.54 ms | 401 KiB | 5 Q