3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Singleton{ public static $error = "Fout opgetreden"; /** * Returns the Singleton instance of this class. * @return Singleton The Singleton instance. */ public static function getInstance(){ $instance = new self(); return $instance; } /** * Private constructor to prevent creating a new instance of the Singleton via the `new` operator from outside of this class. */ private function __construct(){ } public function greet($name){ return 'Hi '. $name; } } $obj = Singleton::getInstance(); //echo Singleton::$error; // Fout opgetreden echo $obj->greet('Frank');

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.0200.01016.50
8.3.50.0080.00621.99
8.3.40.0070.00718.76
8.3.30.0030.01018.88
8.3.20.0000.00820.38
8.3.10.0090.00023.63
8.3.00.0040.00419.05
8.2.180.0090.00618.16
8.2.170.0110.00422.96
8.2.160.0070.00720.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00820.79
8.2.110.0090.00020.47
8.2.100.0050.00517.72
8.2.90.0000.00819.16
8.2.80.0000.00817.97
8.2.70.0040.00417.50
8.2.60.0040.00417.93
8.2.50.0000.00718.07
8.2.40.0050.00320.07
8.2.30.0000.00718.14
8.2.20.0000.00819.47
8.2.10.0000.00718.13
8.2.00.0000.00817.75
8.1.280.0070.01025.92
8.1.270.0110.00423.86
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00923.85
8.1.230.0060.00623.83
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0060.00617.23
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0000.01020.17
8.1.160.0000.00821.84
8.1.150.0050.00318.58
8.1.140.0040.00417.39
8.1.130.0000.00717.73
8.1.120.0070.00017.30
8.1.110.0050.00217.33
8.1.100.0030.00317.45
8.1.90.0000.00817.42
8.1.80.0040.00417.40
8.1.70.0050.00317.30
8.1.60.0050.00317.60
8.1.50.0040.00417.49
8.1.40.0030.00617.41
8.1.30.0000.01117.54
8.1.20.0040.00417.57
8.1.10.0040.00417.62
8.1.00.0000.00717.57
8.0.300.0000.00718.77
8.0.290.0070.00017.16
8.0.280.0000.00718.46
8.0.270.0030.00317.23
8.0.260.0030.00317.28
8.0.250.0050.00216.98
8.0.240.0000.00816.88
8.0.230.0030.00316.82
8.0.220.0000.00616.79
8.0.210.0070.00016.93
8.0.200.0000.00616.94
8.0.190.0070.00016.98
8.0.180.0000.00816.93
8.0.170.0040.00416.95
8.0.160.0070.00017.00
8.0.150.0050.00316.87
8.0.140.0070.00016.89
8.0.130.0050.00013.32
8.0.120.0060.00316.93
8.0.110.0050.00316.90
8.0.100.0030.00516.77
8.0.90.0040.00416.89
8.0.80.0060.01116.73
8.0.70.0030.00516.79
8.0.60.0000.00716.75
8.0.50.0040.00416.62
8.0.30.0060.01217.22
8.0.20.0100.01017.40
8.0.10.0000.00716.86
8.0.00.0090.00816.94
7.4.330.0000.00515.00
7.4.320.0000.00616.46
7.4.300.0000.00616.50
7.4.290.0060.00516.63
7.4.280.0070.00016.50
7.4.270.0030.00316.54
7.4.260.0040.00416.43
7.4.250.0040.00416.53
7.4.240.0040.00416.56
7.4.230.0080.00016.63
7.4.220.0180.00716.59
7.4.210.0070.00816.54
7.4.200.0070.00016.46
7.4.190.0070.00016.57
7.4.160.0130.01016.64
7.4.150.0130.00717.40
7.4.140.0090.01217.86
7.4.130.0100.01016.60
7.4.120.0060.01016.48
7.4.110.0150.00316.49
7.4.100.0070.01116.43
7.4.90.0060.01316.46
7.4.80.0040.02119.39
7.4.70.0100.00716.59
7.4.60.0080.00816.44
7.4.50.0040.00416.68
7.4.40.0070.01016.54
7.4.30.0070.01016.32
7.4.10.0100.01014.98
7.4.00.0050.01215.01
7.3.330.0000.00613.19
7.3.320.0000.00613.25
7.3.310.0070.00016.18
7.3.300.0030.00316.23
7.3.290.0070.00716.19
7.3.280.0060.01216.24
7.3.270.0120.00917.40
7.3.260.0120.00916.32
7.3.250.0120.00516.41
7.3.240.0040.02016.38
7.3.230.0100.01316.39
7.3.210.0120.00316.15
7.3.200.0160.00619.39
7.3.190.0170.00016.25
7.3.180.0090.00616.27
7.3.170.0060.01216.27
7.3.160.0090.00616.36
7.3.130.0140.00614.62
7.3.120.0030.01214.71
7.3.110.0060.01014.79
7.3.100.0000.01314.49
7.3.90.0070.01014.71
7.3.80.0060.00614.63
7.3.70.0030.01014.57
7.3.60.0040.00414.50
7.3.50.0040.01114.55
7.3.40.0070.00414.52
7.3.30.0070.00714.46
7.3.20.0070.00716.44
7.3.10.0060.00516.59
7.3.00.0050.00716.43
7.2.330.0100.00716.41
7.2.320.0060.01716.70
7.2.310.0060.01716.72
7.2.300.0060.01616.45
7.2.290.0030.01416.72
7.2.260.0070.01115.00
7.2.250.0170.00314.90
7.2.240.0130.00014.84
7.2.230.0100.00715.00
7.2.220.0090.00914.98
7.2.210.0060.00314.86
7.2.200.0030.01015.16
7.2.190.0040.01115.03
7.2.180.0090.00615.01
7.2.170.0060.00615.10
7.2.160.0140.00015.18
7.2.150.0030.01417.07
7.2.140.0100.00317.04
7.2.130.0100.00316.59
7.2.120.0120.00316.90
7.2.110.0080.00616.81
7.2.100.0030.01216.85
7.2.90.0080.00616.90
7.2.80.0050.00916.94
7.2.70.0050.00916.88
7.2.60.0060.01016.81
7.2.50.0100.00616.80
7.2.40.0060.01316.67
7.2.30.0080.01016.77
7.2.20.0050.01116.86
7.2.10.0050.00816.87
7.2.00.0050.00917.70
7.1.330.0100.00315.62
7.1.320.0150.00315.61
7.1.310.0110.00315.58
7.1.300.0040.01115.48
7.1.290.0100.00015.57
7.1.280.0070.00715.48
7.1.270.0070.00715.63
7.1.260.0030.00615.72
7.1.250.0060.00815.28
7.1.240.0120.00015.61
7.1.230.0070.00715.87
7.1.220.0050.00515.69
7.1.210.0070.00715.36
7.1.200.0050.00715.62
7.1.190.0030.01215.62
7.1.180.0030.00715.63
7.1.170.0030.01015.66
7.1.160.0060.00315.60
7.1.150.0090.00615.63
7.1.140.0030.00915.64
7.1.130.0040.00715.39
7.1.120.0040.00815.66
7.1.110.0090.00015.41
7.1.100.0060.00516.66
7.1.90.0040.01115.66
7.1.80.0090.00015.80
7.1.70.0040.00816.37
7.1.60.0110.01117.54
7.1.50.0040.01015.96
7.1.40.0030.00915.64
7.1.30.0040.00815.50
7.1.20.0030.01415.63
7.1.10.0100.00715.44
7.1.00.0050.04119.04
7.0.330.0000.01715.18
7.0.320.0030.01215.04
7.0.310.0080.00615.20
7.0.300.0060.00915.36
7.0.290.0000.01015.34
7.0.280.0030.01215.29
7.0.270.0030.00715.33
7.0.260.0030.01315.00
7.0.250.0030.00715.45
7.0.240.0030.01015.43
7.0.230.0030.00915.33
7.0.220.0050.00515.11
7.0.210.0040.01115.43
7.0.200.0030.00815.93
7.0.190.0040.00715.25
7.0.180.0100.00315.52
7.0.170.0040.01115.51
7.0.160.0100.00715.56
7.0.150.0070.01115.25
7.0.140.0110.03318.72
7.0.130.0070.00715.57
7.0.120.0040.00915.55
7.0.110.0080.00515.40
7.0.100.0030.01015.34
7.0.90.0030.00915.39
7.0.80.0100.00615.13
7.0.70.0040.00815.26
7.0.60.0050.02317.54
7.0.50.0040.03716.67
7.0.40.0060.04116.79
7.0.30.0200.04416.71
7.0.20.0270.03216.79
7.0.10.0060.03016.83
7.0.00.0130.02016.78
5.6.400.0120.00014.24
5.6.390.0120.00614.26
5.6.380.0080.00414.51
5.6.370.0070.00714.57
5.6.360.0100.00714.23
5.6.350.0040.01214.39
5.6.340.0090.00614.58
5.6.330.0000.01514.34
5.6.320.0070.00714.68
5.6.310.0060.01014.64
5.6.300.0030.01714.38
5.6.290.0070.00714.19
5.6.280.0030.04017.67
5.6.270.0090.00614.26
5.6.260.0100.00614.41
5.6.250.0070.00714.10
5.6.240.0080.00414.23
5.6.230.0120.00414.41
5.6.220.0030.01014.56
5.6.210.0100.03817.66
5.6.200.0070.04316.28
5.6.190.0100.04317.39
5.6.180.0220.03517.49
5.6.170.0170.02017.50
5.6.160.0070.04217.49
5.6.150.0030.04816.31
5.6.140.0030.02816.23
5.6.130.0050.04516.10
5.6.120.0050.04717.70
5.6.110.0120.03717.53
5.6.100.0100.03317.63
5.6.90.0040.04017.65
5.6.80.0090.04017.46
5.6.70.0090.00013.95
5.6.60.0070.01014.12
5.6.50.0100.00714.09
5.6.40.0080.00813.96
5.6.30.0080.00314.00
5.6.20.0080.00614.16
5.6.10.0040.00814.34
5.6.00.0000.01014.22
5.5.380.0080.00614.54
5.5.370.0110.00414.45
5.5.360.0040.01114.30
5.5.350.0050.04217.39
5.5.340.0030.02816.23
5.5.330.0090.04617.43
5.5.320.0130.03517.12
5.5.310.0150.02917.27
5.5.300.0030.03516.12
5.5.290.0090.04116.15
5.5.280.0020.03317.54
5.5.270.0110.04417.54
5.5.260.0090.04317.42
5.5.250.0050.04617.51
5.5.240.2030.02217.30
5.5.230.0000.00914.11
5.5.220.0000.00814.31
5.5.210.0070.01014.32
5.5.200.0070.00314.25
5.5.190.0000.01514.36
5.5.180.0030.00714.11
5.5.170.0040.00713.93
5.5.160.0030.00914.33
5.5.150.0100.00314.33
5.5.140.0070.00714.33
5.5.130.0110.00414.22
5.5.120.0060.00314.23
5.5.110.0030.00714.36
5.5.100.0040.01114.20
5.5.90.0030.01314.13
5.5.80.0070.00714.34
5.5.70.0030.00614.17
5.5.60.0130.00014.14
5.5.50.0060.00614.42
5.5.40.0100.00014.18
5.5.30.0030.00814.26
5.5.20.0070.00714.05
5.5.10.0100.00613.92
5.5.00.0110.00414.07
5.4.450.0610.02216.15
5.4.440.0380.02316.05
5.4.430.0370.02816.01
5.4.420.0440.02215.94
5.4.410.0420.02715.96
5.4.400.0750.02715.89
5.4.390.0630.02115.94
5.4.380.0120.02615.68
5.4.370.0130.02715.72
5.4.360.0100.02715.69
5.4.350.0100.03015.66
5.4.340.0150.02515.61
5.4.330.0000.00712.71
5.4.320.0060.02012.60
5.4.310.0040.02412.60
5.4.300.0040.02312.61
5.4.290.0110.01912.60
5.4.280.0060.02112.55
5.4.270.0040.02112.55
5.4.260.0040.02312.55
5.4.250.0100.02712.55
5.4.240.0060.02912.55
5.4.230.0090.03412.55
5.4.220.0110.02812.55
5.4.210.0100.02612.55
5.4.200.0090.02812.55
5.4.190.0090.03212.55
5.4.180.0060.03212.55
5.4.170.0100.02812.55
5.4.160.0040.03012.55
5.4.150.0050.03012.55
5.4.140.0030.03212.39
5.4.130.0110.02812.38
5.4.120.0070.02912.37
5.4.110.0060.02912.36
5.4.100.0050.03412.36
5.4.90.0040.03112.36
5.4.80.0070.02612.36
5.4.70.0090.02712.36
5.4.60.0040.03112.36
5.4.50.0070.02812.36
5.4.40.0060.03012.35
5.4.30.0050.02812.35
5.4.20.0090.04112.35
5.4.10.0060.02812.35
5.4.00.0090.02512.10
5.3.290.0070.02612.75
5.3.280.0080.02212.71
5.3.270.0080.03112.72
5.3.260.0070.04312.71
5.3.250.0130.04312.71
5.3.240.0050.02712.71
5.3.230.0090.03012.71
5.3.220.0060.02512.69
5.3.210.0080.02512.69
5.3.200.0090.02012.69
5.3.190.0050.02412.69
5.3.180.0050.02212.69
5.3.170.0070.02112.69
5.3.160.0050.02012.69
5.3.150.0050.02412.69
5.3.140.0050.02412.68
5.3.130.0070.02412.68
5.3.120.0060.02712.68
5.3.110.0020.02712.68
5.3.100.0060.02712.41
5.3.90.0070.02912.41
5.3.80.0080.02712.40
5.3.70.0090.02012.40
5.3.60.0070.02112.39
5.3.50.0050.02112.37
5.3.40.0040.02412.37
5.3.30.0070.02412.35
5.3.20.0030.02512.24
5.3.10.0060.02412.22
5.3.00.0050.02912.21
5.2.170.0070.0339.23
5.2.160.0050.0439.22
5.2.150.0060.0389.22
5.2.140.0090.0399.22
5.2.130.0060.0409.18
5.2.120.0040.0409.18
5.2.110.0070.0379.19
5.2.100.0080.0299.18
5.2.90.0040.0469.18
5.2.80.0090.0539.18
5.2.70.0140.0479.18
5.2.60.0100.0429.13
5.2.50.0080.0389.10
5.2.40.0080.0429.08
5.2.30.0050.0399.05
5.2.20.0080.0279.04
5.2.10.0030.0318.95
5.2.00.0070.0348.81
5.1.60.0050.0308.09
5.1.50.0020.0298.09
5.1.40.0040.0268.07
5.1.30.0060.0278.42
5.1.20.0070.0248.44
5.1.10.0040.0278.17
5.1.00.0020.0318.16
5.0.50.0030.0226.64
5.0.40.0040.0196.51
5.0.30.0030.0316.32
5.0.20.0010.0216.28
5.0.10.0020.0206.27
5.0.00.0030.0306.25
4.4.90.0040.0144.77
4.4.80.0030.0154.76
4.4.70.0030.0154.75
4.4.60.0000.0194.76
4.4.50.0040.0144.77
4.4.40.0040.0254.70
4.4.30.0040.0174.76
4.4.20.0050.0144.84
4.4.10.0010.0184.85
4.4.00.0020.0324.76
4.3.110.0030.0234.67
4.3.100.0040.0214.66
4.3.90.0050.0204.63
4.3.80.0010.0314.58
4.3.70.0010.0164.63
4.3.60.0030.0164.63
4.3.50.0030.0184.63
4.3.40.0060.0284.54
4.3.30.0020.0213.30
4.3.20.0020.0203.28
4.3.10.0040.0153.23
4.3.00.0170.03316.15

preferences:
33.63 ms | 401 KiB | 5 Q