3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Singleton { public static function getInstance() { static $instance = null; if (null === $instance) { $instance = new static(); } return $instance; } abstract protected function __construct(); // prevent new instances using "new" final private function __clone(){} // prevent cloning final private function __wakeup(){} // prevent unserializing } class odb extends Singleton { /*** Credentials ***/ private $sPDOHost = 'localhost'; private $sPDOUser = 'username'; private $sPDOPass = 'password'; private $sPDODB = 'database'; /*** Main Constructor ***/ protected function __construct() { /*$this->oPDO = new PDO('mysql:host=' . $this->sPDOHost . ';' . 'dbname=' . $this->sPDODB, $this->sPDOUser, $this->sPDOPass); */ echo "hi"; throw new Exception("wrong"); } } try{ $Test = odb::getInstance(); }catch(Exception $e){ die("oops"); } ?>

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.00716.73
8.3.60.0070.01416.88
8.3.50.0130.01022.12
8.3.40.0110.00818.68
8.3.30.0070.00719.10
8.3.20.0030.00520.21
8.3.10.0050.00323.67
8.3.00.0080.00319.19
8.2.180.0090.00618.50
8.2.170.0060.00922.96
8.2.160.0030.01020.39
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0060.01026.16
8.2.120.0080.00022.16
8.2.110.0030.00720.39
8.2.100.0040.00817.91
8.2.90.0000.00819.09
8.2.80.0040.00418.04
8.2.70.0030.00617.63
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0060.00318.22
8.2.30.0080.00018.06
8.2.20.0040.00417.62
8.2.10.0000.00717.92
8.2.00.0070.00317.62
8.1.280.0110.00425.92
8.1.270.0050.00222.18
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00022.18
8.1.230.0040.00822.84
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0050.00317.53
8.1.180.0040.00418.10
8.1.170.0080.00018.71
8.1.160.0040.00421.93
8.1.150.0000.00818.70
8.1.140.0040.00417.41
8.1.130.0030.00317.86
8.1.120.0070.00017.46
8.1.110.0000.00817.50
8.1.100.0000.00717.38
8.1.90.0040.00417.50
8.1.80.0000.00817.45
8.1.70.0000.00717.47
8.1.60.0030.00717.47
8.1.50.0000.00817.55
8.1.40.0000.00817.54
8.1.30.0040.00417.56
8.1.20.0000.00817.55
8.1.10.0080.00017.58
8.1.00.0080.00017.51
8.0.300.0070.00018.77
8.0.290.0050.00217.05
8.0.280.0070.00018.48
8.0.270.0040.00417.16
8.0.260.0030.00317.28
8.0.250.0040.00417.02
8.0.240.0000.00717.05
8.0.230.0030.00316.90
8.0.220.0030.00316.96
8.0.210.0070.00016.91
8.0.200.0000.00716.94
8.0.190.0000.00716.97
8.0.180.0000.00716.96
8.0.170.0050.00216.88
8.0.160.0000.00816.91
8.0.150.0040.00416.88
8.0.140.0000.00816.82
8.0.130.0030.00613.43
8.0.120.0080.00016.84
8.0.110.0030.00616.96
8.0.100.0000.00716.77
8.0.90.0060.00316.90
8.0.80.0060.00916.94
8.0.70.0030.00316.89
8.0.60.0070.00016.80
8.0.50.0050.00216.88
8.0.30.0050.01517.17
8.0.20.0090.00917.41
8.0.10.0070.00016.90
8.0.00.0130.00616.85
7.4.330.0020.00215.09
7.4.320.0000.00616.49
7.4.300.0040.00416.59
7.4.290.0030.00316.49
7.4.280.0090.00016.55
7.4.270.0040.00416.59
7.4.260.0030.00316.51
7.4.250.0040.00416.43
7.4.240.0050.00216.48
7.4.230.0070.00016.66
7.4.220.0100.00716.46
7.4.210.0100.00616.51
7.4.200.0070.00016.70
7.4.190.0070.00016.46
7.4.160.0090.00616.27
7.4.150.0170.00717.40
7.4.140.0060.01317.86
7.4.130.0070.01316.52
7.4.120.0100.00716.58
7.4.110.0170.00316.55
7.4.100.0090.00916.49
7.4.90.0080.01716.63
7.4.80.0030.01319.39
7.4.70.0100.00816.56
7.4.60.0160.00016.57
7.4.50.0050.00016.55
7.4.40.0140.00322.77
7.4.30.0180.00516.68
7.4.00.0070.01014.79
7.3.330.0050.00013.39
7.3.320.0000.00513.49
7.3.310.0030.00316.48
7.3.300.0030.00316.36
7.3.290.0070.01016.34
7.3.280.0090.01216.41
7.3.270.0100.00717.40
7.3.260.0130.00316.59
7.3.250.0140.00516.50
7.3.240.0030.01616.62
7.3.230.0060.01016.39
7.3.210.0110.00616.32
7.3.200.0150.00919.39
7.3.190.0130.00716.60
7.3.180.0120.00416.48
7.3.170.0090.00616.49
7.3.160.0110.00416.66
7.3.120.0060.01014.93
7.3.110.0140.00414.93
7.3.100.0070.00715.00
7.3.90.0060.00914.88
7.3.80.0030.01014.85
7.3.70.0040.00814.89
7.3.60.0040.01414.78
7.3.50.0090.00614.85
7.3.40.0030.00714.93
7.3.30.0060.00914.93
7.3.20.0070.01016.80
7.3.10.0040.01016.62
7.3.00.0060.00716.51
7.2.330.0100.00616.59
7.2.320.0140.00316.39
7.2.310.0170.00716.81
7.2.300.0110.00616.52
7.2.290.0130.00416.50
7.2.250.0080.01114.99
7.2.240.0100.00715.03
7.2.230.0140.00315.28
7.2.220.0060.00614.95
7.2.210.0030.01015.00
7.2.200.0100.00015.11
7.2.190.0060.01215.05
7.2.180.0070.00314.99
7.2.170.0000.01114.73
7.2.130.0090.00216.97
7.2.120.0020.01116.96
7.2.110.0050.00916.87
7.2.100.0040.00716.91
7.2.90.0090.00416.96
7.2.80.0080.00516.96
7.2.70.0080.00516.67
7.2.60.0060.00716.96
7.2.50.0030.01217.09
7.2.40.0030.00816.92
7.2.30.0040.00817.04
7.2.20.0020.00616.97
7.2.10.0070.00716.99
7.2.00.0030.00917.60
7.1.330.0060.00815.76
7.1.320.0030.00615.72
7.1.310.0030.00615.89
7.1.300.0070.00315.83
7.1.290.0070.00715.68
7.1.280.0040.01215.53
7.1.270.0030.01215.50
7.1.260.0030.00715.96
7.1.250.0030.00915.78
7.1.240.0000.00915.89
7.1.230.0040.00715.86
7.1.220.0070.00415.89
7.1.210.0030.01015.73
7.1.200.0040.00715.63
7.1.190.0110.00015.73
7.1.180.0070.00416.00
7.1.170.0070.00715.80
7.1.160.0000.01215.63
7.1.150.0040.01115.85
7.1.140.0040.00715.64
7.1.130.0000.00915.64
7.1.120.0000.01215.46
7.1.110.0000.01215.88
7.1.100.0030.00717.03
7.1.90.0090.00315.84
7.1.80.0040.01115.72
7.1.70.0030.01016.48
7.1.60.0050.01017.62
7.1.50.0070.01016.21
7.1.40.0060.00315.91
7.1.30.0030.00715.92
7.1.20.0100.00015.93
7.1.10.0000.01015.66
7.1.00.0070.04019.12
7.0.330.0040.00815.45
7.0.320.0030.01015.20
7.0.310.0070.00415.48
7.0.300.0000.01215.38
7.0.290.0110.00415.34
7.0.280.0090.00315.57
7.0.270.0000.01015.42
7.0.260.0090.00315.29
7.0.250.0030.00715.22
7.0.240.0000.00915.22
7.0.230.0040.00415.15
7.0.220.0030.01315.55
7.0.210.0110.00415.52
7.0.200.0070.00316.13
7.0.190.0070.00315.44
7.0.180.0000.01115.27
7.0.170.0060.00315.32
7.0.160.0060.00315.56
7.0.150.0000.01215.38
7.0.140.0030.03818.65
7.0.130.0040.00715.46
7.0.120.0050.00315.48
7.0.110.0080.00315.34
7.0.100.0070.04517.68
7.0.90.0030.04317.72
7.0.80.0050.04617.69
7.0.70.0060.03117.57
7.0.60.0080.04717.60
7.0.50.0040.03017.81
7.0.40.0070.04016.81
7.0.30.0060.04016.81
7.0.20.0050.04216.69
7.0.10.0120.04216.76
7.0.00.0110.04216.76
5.6.380.0040.01114.14
5.6.370.0080.00314.36
5.6.360.0070.00714.23
5.6.350.0030.00914.53
5.6.340.0090.00314.06
5.6.330.0110.00314.48
5.6.320.0070.00714.67
5.6.310.0070.00314.48
5.6.300.0030.01014.30
5.6.290.0100.00714.26
5.6.280.0050.03917.49
5.6.270.0000.00814.46
5.6.260.0070.00714.31
5.6.250.0110.04317.52
5.6.240.0030.04717.50
5.6.230.0110.04017.48
5.6.220.0050.04417.46
5.6.210.0050.03717.54
5.6.200.0080.04717.71
5.6.190.0070.04417.67
5.6.180.0080.03517.68
5.6.170.0080.04617.77
5.6.160.0090.04317.65
5.6.150.0060.04017.54
5.6.140.0050.04517.54
5.6.130.0070.03717.59
5.6.120.0080.02817.57
5.6.110.0030.04717.67
5.6.100.0060.04817.65
5.6.90.0080.04717.85
5.6.80.0020.03517.25
5.6.70.0070.02217.36
5.6.60.0080.04217.48
5.6.50.0080.03317.19
5.6.40.0070.04217.26
5.6.30.0130.03717.27
5.6.20.0090.03817.37
5.6.10.0070.03817.38
5.6.00.0070.03117.38
5.5.380.0050.04615.78
5.5.370.0120.03815.78
5.5.360.0050.03315.87
5.5.350.0030.04215.81
5.5.340.0060.04216.03
5.5.330.0020.04816.06
5.5.320.0060.04515.99
5.5.310.0100.04016.02
5.5.300.0070.04015.97
5.5.290.0080.04515.99
5.5.280.0030.04516.06
5.5.270.0090.04515.91
5.5.260.0120.03016.08
5.5.250.0090.03815.95
5.5.240.0110.03515.75
5.5.230.0130.01915.75
5.5.220.0070.02415.60
5.5.210.0070.03815.66
5.5.200.0030.04515.67
5.5.190.0050.04515.73
5.5.180.0060.04315.71
5.5.170.0030.01011.18
5.5.160.0050.04015.72
5.5.150.0100.03715.74
5.5.140.0080.03515.71
5.5.130.0050.04315.73
5.5.120.0050.03915.77
5.5.110.0020.04115.69
5.5.100.0020.04715.64
5.5.90.0050.04315.68
5.5.80.0050.04315.58
5.5.70.0070.04015.61
5.5.60.0050.03315.59
5.5.50.0020.04915.66
5.5.40.0090.03915.62
5.5.30.0030.03215.62
5.5.20.0050.02815.62
5.5.10.0070.03715.62
5.5.00.0090.03215.59
5.4.450.0070.03715.28
5.4.440.0060.04115.21
5.4.430.0050.04315.22
5.4.420.0050.04315.31
5.4.410.0030.02715.21
5.4.400.0070.03415.05
5.4.390.0090.03715.15
5.4.380.0030.04315.17
5.4.370.0030.02915.21
5.4.360.0050.02215.21
5.4.350.0100.03515.16
5.4.340.0030.04315.14
5.4.330.0000.01011.18
5.4.320.0020.04415.07
5.4.310.0070.03215.06
5.4.300.0050.04315.16
5.4.290.0050.04015.03
5.4.280.0100.03715.18
5.4.270.0070.02315.17
5.4.260.0050.04215.15
5.4.250.0020.04115.10
5.4.240.0070.03015.20
5.4.230.0090.03015.17
5.4.220.0020.03415.19
5.4.210.0030.04015.13
5.4.200.0050.03715.13
5.4.190.0070.03815.03
5.4.180.0070.03715.10
5.4.170.0050.04015.19
5.4.160.0070.04015.03
5.4.150.0080.03715.19
5.4.140.0000.04313.85
5.4.130.0090.03513.71
5.4.120.0060.03113.84
5.4.110.0120.03213.85
5.4.100.0080.03013.80
5.4.90.0080.02613.81
5.4.80.0070.03713.85
5.4.70.0200.02713.88
5.4.60.0030.03913.79
5.4.50.0030.04013.76
5.4.40.0070.03713.82
5.4.30.0030.04313.82
5.4.20.0060.04013.79
5.4.10.0070.04013.76
5.4.00.0080.02313.54
5.3.290.0100.03812.94
5.3.280.0030.03612.87
5.3.270.0090.03312.91
5.3.260.0050.04012.88
5.3.250.0060.03812.93
5.3.240.0080.03612.86
5.3.230.0050.02312.88
5.3.220.0000.04512.91
5.3.210.0030.02812.91
5.3.200.0050.04012.84
5.3.190.0070.02212.85
5.3.180.0100.03212.85
5.3.170.0000.04412.94
5.3.160.0050.04012.88
5.3.150.0070.03812.87
5.3.140.0060.03812.90
5.3.130.0000.03012.92
5.3.120.0060.03812.90
5.3.110.0030.04012.86
5.3.100.0050.04012.60
5.3.90.0110.02912.60
5.3.80.0020.04112.59
5.3.70.0040.03512.63
5.3.60.0090.03912.55
5.3.50.0080.03512.59
5.3.40.0020.02212.53
5.3.30.0010.02312.51
5.3.20.0060.03012.47
5.3.10.0030.02312.46
5.3.00.0080.01612.37
5.2.170.0080.03011.13
5.2.160.0060.01811.09
5.2.150.0040.01711.22
5.2.140.0020.03011.19
5.2.130.0040.01511.13
5.2.120.0020.01811.19
5.2.110.0020.01811.15
5.2.100.0030.01811.14
5.2.90.0030.01411.13
5.2.80.0010.01611.19
5.2.70.0010.02111.15
5.2.60.0020.01711.16
5.2.50.0000.02011.11
5.2.40.0020.01711.14
5.2.30.0020.01711.04
5.2.20.0020.01711.03
5.2.10.0020.03310.95
5.2.00.0030.02211.02
5.1.60.0000.03310.53
5.1.50.0030.02910.61
5.1.40.0030.02710.57
5.1.30.0030.02510.73
5.1.20.0030.02110.72
5.1.10.0040.02610.54
5.1.00.0030.01510.54
5.0.50.0010.01510.38
5.0.40.0030.01110.38
5.0.30.0000.02010.38
5.0.20.0030.01210.38
5.0.10.0020.01210.38
5.0.00.0020.01710.38
4.4.90.0020.01010.38
4.4.80.0030.00810.38
4.4.70.0020.00810.38
4.4.60.0000.01210.38
4.4.50.0020.01310.38
4.4.40.0030.03010.38
4.4.30.0030.01310.38
4.4.20.0030.01010.38
4.4.10.0000.01210.38
4.4.00.0030.01510.38
4.3.110.0050.00710.38
4.3.100.0030.01210.38
4.3.90.0020.01710.38
4.3.80.0030.01310.38
4.3.70.0020.01010.38
4.3.60.0020.00910.38
4.3.50.0030.00610.38
4.3.40.0050.01010.38
4.3.30.0020.01010.38
4.3.20.0020.01310.38
4.3.10.0030.01310.38
4.3.00.0000.01310.38

preferences:
56.92 ms | 401 KiB | 5 Q