3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Loader { ##針對路徑 public $_path = "include/public/"; ##文件夾名稱 public $_dir_name = 'MobileShop'; ##對像庫 static private $_Object = array(); ##構造方法 function __construct(){ // } ##核心接口調用方法 function Mode($name=''){ ##是否有重定文件夾 if(empty($name)){ die("Error: can not find!".$name); } ##該定位是否為一個文件夾 $path = FILE_PATH.$this->_path.$this->_dir_name; if(!is_dir($path)){ die("Error: ".$this->_dir_name." Is not a dir!"); } ##判斷是否有文件 $fileName = $path."/".$name.".class.php"; if(!file_exists($fileName)){ die("Error: $name The file is not exists!"); } ##判斷是否有加載控制方法 if(!class_exists($this->_dir_name."Control")){ include($path."/".$this->_dir_name."Control.php"); } if(!class_exists($this->_dir_name."Control")){ die("Error:CLASS:".$this->_dir_name."Control is not exists!"); } ##判斷對像是否存在 if(!class_exists($name)){ include($fileName); } if(!class_exists($name)){ die("Error:CLASS: ".$name." is not exists!"); } self::$_Object[$name] = new $name; return self::$_Object[$name]; } ##魔術方法取值 function __get($name){ ##判斷對像庫里是否有存在相同的對像,有則直接返回 if(isset(self::$_Object[$name]) && is_object(self::$_Object[$name])){ return self::$_Object[$name]; }else{ $object = self::Mode($name); return $object; } } }

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.40.0140.00418.68
8.3.30.0110.00418.96
8.3.20.0050.00320.21
8.3.10.0040.00423.48
8.3.00.0040.00420.92
8.2.170.0110.01118.88
8.2.160.0070.00722.96
8.2.150.0100.00325.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00420.73
8.2.110.0060.00322.21
8.2.100.0030.00917.59
8.2.90.0030.00518.98
8.2.80.0080.00017.97
8.2.70.0030.00617.38
8.2.60.0130.00317.42
8.2.50.0080.00018.07
8.2.40.0000.00819.72
8.2.30.0000.01018.18
8.2.20.0040.00417.57
8.2.10.0000.00818.03
8.2.00.0060.00317.59
8.1.270.0040.00424.66
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0080.00023.80
8.1.230.0080.00317.42
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0070.00317.22
8.1.190.0080.00017.00
8.1.180.0050.00318.10
8.1.170.0060.00318.53
8.1.160.0040.00422.04
8.1.150.0000.00718.54
8.1.140.0000.00817.33
8.1.130.0030.00317.71
8.1.120.0030.00317.25
8.1.110.0030.00517.40
8.1.100.0070.00017.36
8.1.90.0000.00717.36
8.1.80.0000.00817.36
8.1.70.0000.00717.28
8.1.60.0000.00817.48
8.1.50.0030.00617.33
8.1.40.0000.00817.34
8.1.30.0030.00617.62
8.1.20.0050.00317.42
8.1.10.0030.00517.45
8.1.00.0000.00717.36
8.0.300.0030.00618.77
8.0.290.0080.00016.58
8.0.280.0030.00318.34
8.0.270.0000.00717.07
8.0.260.0000.01017.11
8.0.250.0000.00616.83
8.0.240.0060.00316.87
8.0.230.0070.00016.89
8.0.220.0030.00316.75
8.0.210.0040.00416.79
8.0.200.0030.00316.91
8.0.190.0000.00816.85
8.0.180.0000.00716.77
8.0.170.0040.00416.88
8.0.160.0000.00716.73
8.0.150.0030.00716.77
8.0.140.0000.00716.75
8.0.130.0000.00513.18
8.0.120.0050.00316.67
8.0.110.0000.00716.69
8.0.100.0000.00716.82
8.0.90.0050.00316.79
8.0.80.0110.00716.67
8.0.70.0040.00416.62
8.0.60.0000.00716.67
8.0.50.0000.00816.60
8.0.30.0090.01016.98
8.0.20.0080.01117.40
8.0.10.0020.00516.75
8.0.00.0110.00916.70
7.4.330.0020.00215.00
7.4.320.0030.00316.42
7.4.300.0000.00716.50
7.4.290.0100.00016.37
7.4.280.0040.00416.43
7.4.270.0030.00316.40
7.4.260.0030.00316.48
7.4.250.0060.00316.45
7.4.240.0030.00416.37
7.4.230.0000.00716.53
7.4.220.0220.00416.52
7.4.210.0130.00316.44
7.4.200.0050.00216.42
7.4.160.0100.01016.09
7.4.150.0120.00617.40
7.4.140.0070.01017.86
7.4.130.0070.01116.38
7.4.120.0090.00916.40
7.4.110.0090.01016.26
7.4.100.0120.00916.49
7.4.90.0100.00716.38
7.4.80.0090.01319.39
7.4.70.0000.01616.33
7.4.60.0160.00616.49
7.4.50.0000.00816.30
7.4.40.0170.00316.40
7.4.30.0140.00416.38
7.4.10.0040.01115.11
7.4.00.0060.01015.07
7.3.330.0000.00713.13
7.3.320.0020.00213.20
7.3.310.0070.00016.19
7.3.300.0070.00016.05
7.3.290.0060.00916.17
7.3.280.0120.00716.20
7.3.270.0060.01217.40
7.3.260.0100.01316.21
7.3.250.0120.00516.27
7.3.240.0100.01016.27
7.3.230.0120.00616.39
7.3.210.0090.00916.11
7.3.200.0090.00619.39
7.3.190.0100.01016.18
7.3.180.0100.00716.16
7.3.170.0060.00916.44
7.3.160.0060.01216.22
7.3.130.0120.00315.11
7.3.120.0080.00814.88
7.3.110.0070.01115.11
7.3.100.0030.01015.11
7.3.90.0030.01315.11
7.3.80.0030.01215.11
7.3.70.0090.00915.11
7.3.60.0040.01115.11
7.3.50.0040.00715.11
7.3.40.0070.00715.11
7.3.30.0090.00615.11
7.3.20.0040.00816.59
7.3.10.0000.01516.20
7.3.00.0070.00716.45
7.2.330.0040.01416.34
7.2.320.0040.01516.48
7.2.310.0170.00016.32
7.2.300.0060.01016.61
7.2.290.0140.00416.25
7.2.260.0030.01415.11
7.2.250.0070.01015.11
7.2.240.0060.00915.11
7.2.230.0030.01415.11
7.2.220.0030.01015.11
7.2.210.0060.00915.11
7.2.200.0030.00915.11
7.2.190.0070.00715.11
7.2.180.0030.00615.11
7.2.170.0040.01115.11
7.2.160.0080.00415.11
7.2.150.0040.00716.77
7.2.140.0000.01416.77
7.2.130.0060.00916.79
7.2.120.0000.01416.62
7.2.110.0070.00816.64
7.2.100.0040.00616.52
7.2.90.0070.00916.65
7.2.80.0050.00916.42
7.2.70.0080.00716.69
7.2.60.0050.00816.75
7.2.50.0090.00416.70
7.2.40.0040.01216.78
7.2.30.0060.01116.76
7.2.20.0030.01016.65
7.2.10.0070.00816.67
7.2.00.0060.00717.20
7.1.330.0060.00915.73
7.1.320.0080.00315.53
7.1.310.0060.00915.53
7.1.300.0000.01315.42
7.1.290.0110.00415.53
7.1.280.0090.00615.48
7.1.270.0040.00415.38
7.1.260.0040.00715.39
7.1.250.0030.00715.37
7.1.240.0070.00715.37
7.1.230.0070.00515.61
7.1.220.0050.00715.36
7.1.210.0070.00615.63
7.1.200.0090.00415.56
7.1.190.0030.00815.58
7.1.180.0020.00915.43
7.1.170.0030.00715.53
7.1.160.0040.00815.40
7.1.150.0080.00315.50
7.1.140.0050.00815.60
7.1.130.0100.00115.63
7.1.120.0050.00915.63
7.1.110.0070.00815.44
7.1.100.0020.00916.40
7.1.90.0020.01215.43
7.1.80.0070.00715.63
7.1.70.0040.00716.02
7.1.60.0050.00716.04
7.1.50.0090.00915.85
7.1.40.0080.00815.69
7.1.30.0090.00615.50
7.1.20.0080.00615.64
7.1.10.0030.01115.61
7.1.00.0060.03017.85
7.0.330.0040.00815.11
7.0.320.0000.01215.14
7.0.310.0060.00615.26
7.0.300.0060.00315.30
7.0.290.0080.00715.13
7.0.280.0070.00715.04
7.0.270.0040.00715.15
7.0.260.0030.00715.20
7.0.250.0020.00915.17
7.0.240.0030.00915.06
7.0.230.0060.00815.32
7.0.220.0030.00815.18
7.0.210.0070.00515.18
7.0.200.0030.01115.77
7.0.190.0030.00715.10
7.0.180.0080.00515.34
7.0.170.0050.00515.18
7.0.160.0060.00815.17
7.0.150.0060.00815.20
7.0.140.0070.02817.49
7.0.130.0090.00615.21
7.0.120.0080.00515.32
7.0.110.0050.00615.37
7.0.100.0060.00415.17
7.0.90.0070.00415.07
7.0.80.0040.00815.29
7.0.70.0090.00315.26
7.0.60.0020.03016.86
7.0.50.0060.02716.07
7.0.40.0070.01516.20
7.0.30.0080.02116.18
7.0.20.0140.03016.26
7.0.10.0050.02416.21
7.0.00.0060.03016.21
5.6.400.0100.00315.11
5.6.390.0060.00615.11
5.6.380.0050.00914.79
5.6.370.0040.00914.67
5.6.360.0050.01014.60
5.6.350.0060.00614.66
5.6.340.0070.00514.67
5.6.330.0030.00814.51
5.6.320.0070.00214.64
5.6.310.0050.00614.61
5.6.300.0060.00614.39
5.6.290.0070.00414.69
5.6.280.0030.03216.82
5.6.270.0050.00814.59
5.6.260.0050.00714.67
5.6.250.0060.00614.75
5.6.240.0040.01314.67
5.6.230.0030.00914.54
5.6.220.0040.00914.64
5.6.210.0070.02516.57
5.6.200.0070.01815.79
5.6.190.0060.01716.59
5.6.180.1430.01716.56
5.6.170.0120.02116.65
5.6.160.0120.01516.56
5.6.150.0060.01715.71
5.6.140.0040.03315.80
5.6.130.0050.01815.73
5.6.120.0060.02316.71
5.6.110.0080.02016.65
5.6.100.0080.01416.79
5.6.90.0080.03216.80
5.6.80.0030.01916.51
5.6.70.1540.01816.52
5.6.60.0070.00514.61
5.6.50.0020.01114.71
5.6.40.0070.00514.54
5.6.30.0030.00914.48
5.6.20.0030.00914.64
5.6.10.0070.00514.54
5.6.00.0030.01014.55
5.5.380.0040.00813.95
5.5.370.0030.00813.95
5.5.360.0090.00113.95
5.5.350.0090.02616.08
5.5.340.0060.03315.31
5.5.330.0020.02316.09
5.5.320.1270.01816.03
5.5.310.0090.03116.07
5.5.300.0060.01815.32
5.5.290.0030.03215.29
5.5.280.0030.02316.22
5.5.270.0070.02016.29
5.5.260.0060.02016.23
5.5.250.0000.03616.17
5.5.240.0130.02216.09
5.5.230.0050.00613.95
5.5.220.0070.00513.95
5.5.210.0040.00513.95
5.5.200.0060.00313.95
5.5.190.0020.01213.95
5.5.180.0010.00913.95
5.5.170.0060.00614.53
5.5.160.0080.00313.95
5.5.150.0070.00313.95
5.5.140.0090.00213.95
5.5.130.0030.00713.95
5.5.120.0070.00613.95
5.5.110.0020.01013.95
5.5.100.0090.00413.95
5.5.90.0020.00813.95
5.5.80.0060.00513.95
5.5.70.0060.00813.95
5.5.60.0030.00913.95
5.5.50.0060.00713.95
5.5.40.0050.00813.95
5.5.30.0050.00913.95
5.5.20.0060.00613.95
5.5.10.0040.00713.95
5.5.00.0050.00613.95
5.4.450.0190.02019.00
5.4.440.0100.01918.73
5.4.430.0080.01618.73
5.4.420.0110.01718.73
5.4.410.0180.01818.73
5.4.400.0140.01918.72
5.4.390.0320.02015.65
5.4.380.0170.02115.56
5.4.370.0140.02115.54
5.4.360.0120.02615.54
5.4.350.0170.02015.55
5.4.340.0160.02315.56
5.4.330.0060.00513.95
5.4.320.0080.01413.47
5.4.310.0080.01513.47
5.4.300.0060.01513.47
5.4.290.0050.01913.47
5.4.280.0080.01413.44
5.4.270.0060.01713.44
5.4.260.0060.01813.43
5.4.250.0070.01613.44
5.4.240.0050.01813.44
5.4.230.0060.01813.43
5.4.220.0070.01613.43
5.4.210.0070.01713.43
5.4.200.0070.01813.43
5.4.190.0050.02113.43
5.4.180.0090.02013.43
5.4.170.0090.01713.43
5.4.160.0070.01713.43
5.4.150.0090.01813.43
5.4.140.0040.02413.33
5.4.130.0060.02213.32
5.4.120.0040.02413.31
5.4.110.0060.02113.31
5.4.100.0050.01713.31
5.4.90.0050.02113.31
5.4.80.0050.01613.31
5.4.70.0040.01613.31
5.4.60.0050.01713.31
5.4.50.0050.01713.31
5.4.40.0030.02113.30
5.4.30.0080.01913.30
5.4.20.0030.02313.30
5.4.10.0070.01813.30
5.4.00.0050.01613.13
5.3.290.0060.01713.56
5.3.280.0070.01413.53
5.3.270.0040.01613.54
5.3.260.0050.01913.54
5.3.250.0040.01813.54
5.3.240.0030.01813.54
5.3.230.0040.01813.54
5.3.220.0040.01713.52
5.3.210.0070.02113.52
5.3.200.0060.01413.52
5.3.190.0060.01613.52
5.3.180.0040.01713.52
5.3.170.0060.01413.52
5.3.160.0010.02013.52
5.3.150.0050.01513.52
5.3.140.0040.01813.52
5.3.130.0090.01413.52
5.3.120.0060.01613.52
5.3.110.0070.01313.52
5.3.100.0060.01413.34
5.3.90.0040.01713.34
5.3.80.0030.01813.33
5.3.70.0060.01413.33
5.3.60.0050.01513.33
5.3.50.0030.01813.31
5.3.40.0050.01513.31
5.3.30.0070.01513.30
5.3.20.0050.01913.22
5.3.10.0060.01813.21
5.3.00.0090.01613.21
5.2.170.0090.01911.01
5.2.160.0070.01811.01
5.2.150.0060.02011.01
5.2.140.0040.02311.01
5.2.130.0080.01910.99
5.2.120.0050.02210.99
5.2.110.0040.01810.99
5.2.100.0020.01810.99
5.2.90.0050.01610.99
5.2.80.0050.01510.99
5.2.70.0050.01510.99
5.2.60.0060.01610.97
5.2.50.0070.01510.95
5.2.40.0050.01610.94
5.2.30.0050.01410.93
5.2.20.0040.01910.92
5.2.10.0050.01710.88
5.2.00.0040.01610.81
5.1.60.0050.01410.45
5.1.50.0020.01710.45
5.1.40.0040.01510.44
5.1.30.0030.01810.61
5.1.20.0040.01510.62
5.1.10.0020.02110.49
5.1.00.0040.01710.49
5.0.50.0060.0109.73
5.0.40.0020.0129.65
5.0.30.0040.0169.56
5.0.20.0020.0159.54
5.0.10.0030.0179.54
5.0.00.0040.0199.53
4.4.90.0040.0098.79
4.4.80.0040.0098.77
4.4.70.0040.0098.77
4.4.60.0050.0098.77
4.4.50.0040.0118.78
4.4.40.0020.0168.75
4.4.30.0010.0128.78
4.4.20.0020.0118.82
4.4.10.0020.0118.82
4.4.00.0030.0158.78
4.3.110.0040.0108.73
4.3.100.0050.0088.73
4.3.90.0030.0098.71
4.3.80.0040.0138.69
4.3.70.0020.0108.71
4.3.60.0020.0098.71
4.3.50.0030.0098.71
4.3.40.0050.0128.66
4.3.30.0030.0098.04
4.3.20.0050.0088.04
4.3.10.0010.0118.01
4.3.00.0050.00820.53

preferences:
40.33 ms | 400 KiB | 5 Q