3v4l.org

run code in 300+ PHP versions simultaneously
<?php // DBLogger.php class DBLogger { private $enabled; private $operations; private $ignoredTables; public function __construct() { $this->enabled = false; $this->operations = null; $this->ignoredTables = null; } public function enable() { $this->enabled = true; return $this; } public function disable() { $this->enabled = false; return $this; } public function operations($operations) { $this->operations = $operations; return $this; } public function ignoreTables($tables) { $this->ignoredTables = $tables; return $this; } public function log($query) { if(!$this->enabled) return; $queryParts = explode(" ", $query); $queryCommand = $queryParts[0]; if($this->operations === null || strripos($this->operations, $queryCommand) !== false) { $tables = $this->ignoredTables === null ? array() : explode(",", $this->ignoredTables); $numOfTables = count($tables); for($i=0; $i<$numOfTables; $i++) { $tableName = str_replace(" ", "", $tables[$i]); if(strpos($query, $tableName) !== false) { return; } } $file = "queries_".date("Y-d-m").".sql"; $this->writeToFile($file, $query); } return $this; } private function writeToFile($file, $query) { $dir = dirname(__FILE__)."/logs/"; $content = ''; if(file_exists($dir.$file)) { $content = file_get_contents($dir.$file)."\n\n"; } $content .= $query.";"; file_put_contents($dir.$file, $content); } } global $dblogger; $dblogger = new DBLogger();

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.0090.00618.14
8.3.60.0030.01018.30
8.3.50.0150.00521.30
8.3.40.0140.00718.84
8.3.30.0100.01018.92
8.3.20.0070.00020.15
8.3.10.0030.00520.58
8.3.00.0050.00319.25
8.2.180.0040.01116.38
8.2.170.0040.01122.96
8.2.160.0100.00320.43
8.2.150.0000.00824.18
8.2.140.0050.00224.66
8.2.130.0080.00026.16
8.2.120.0040.00422.23
8.2.110.0070.01420.87
8.2.100.0080.00417.91
8.2.90.0000.00917.81
8.2.80.0040.00417.97
8.2.70.0060.00317.38
8.2.60.0000.00817.80
8.2.50.0030.00518.07
8.2.40.0040.00418.22
8.2.30.0040.00419.27
8.2.20.0060.00317.53
8.2.10.0080.00017.90
8.2.00.0000.00817.53
8.1.280.0070.01125.92
8.1.270.0040.00423.84
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0060.00322.12
8.1.230.0030.00921.03
8.1.220.0000.00817.74
8.1.210.0130.00018.86
8.1.200.0030.00617.38
8.1.190.0000.00817.22
8.1.180.0060.00318.10
8.1.170.0040.00718.54
8.1.160.0000.00721.97
8.1.150.0040.00418.86
8.1.140.0040.00417.41
8.1.130.0000.00717.90
8.1.120.0070.00017.44
8.1.110.0050.00317.41
8.1.100.0000.00717.42
8.1.90.0080.00017.38
8.1.80.0070.00017.45
8.1.70.0030.00317.40
8.1.60.0040.00417.52
8.1.50.0050.00217.55
8.1.40.0050.00317.38
8.1.30.0000.00817.57
8.1.20.0030.00517.51
8.1.10.0000.00817.48
8.1.00.0060.00317.45
8.0.300.0040.00420.07
8.0.290.0000.00816.75
8.0.280.0050.00318.41
8.0.270.0070.00016.79
8.0.260.0030.00317.19
8.0.250.0000.00716.89
8.0.240.0050.00316.96
8.0.230.0030.00316.83
8.0.220.0070.00016.73
8.0.210.0070.00016.84
8.0.200.0100.00016.88
8.0.190.0000.00716.86
8.0.180.0040.00416.92
8.0.170.0000.00816.89
8.0.160.0000.00816.90
8.0.150.0040.00416.82
8.0.140.0000.01016.81
8.0.130.0000.00513.29
8.0.120.0060.00215.04
8.0.110.0080.00215.00
8.0.100.0020.00614.96
8.0.90.0000.00815.09
8.0.80.0080.00415.00
8.0.70.0020.00715.02
8.0.60.0090.00015.04
8.0.50.0070.00315.12
8.0.30.0080.01315.73
8.0.20.0110.00616.07
8.0.10.0050.00315.17
8.0.00.0040.01015.61
7.4.330.0000.00615.00
7.4.320.0000.00716.33
7.4.300.0000.00616.63
7.4.290.0040.00416.64
7.4.280.0070.00016.53
7.4.270.0050.00216.64
7.4.260.0000.00716.50
7.4.250.0050.00414.96
7.4.240.0050.00315.47
7.4.230.0030.00615.04
7.4.220.0070.00815.02
7.4.210.0110.00615.02
7.4.200.0000.00814.97
7.4.190.0070.00413.32
7.4.180.0040.00413.31
7.4.160.0070.00715.03
7.4.150.0100.00515.37
7.4.140.0100.00916.33
7.4.130.0080.00815.38
7.4.120.0110.00415.38
7.4.110.0090.00314.77
7.4.100.0090.00614.91
7.4.90.0100.00514.95
7.4.80.0060.00716.24
7.4.70.0100.00514.89
7.4.60.0110.00514.86
7.4.50.0020.00814.81
7.4.40.0130.00314.76
7.4.30.0100.00514.87
7.4.20.0100.00413.26
7.4.10.0090.00413.20
7.4.00.0050.01014.09
7.3.330.0050.00013.32
7.3.320.0050.00013.29
7.3.310.0060.00314.88
7.3.300.0040.00414.72
7.3.290.0070.00514.77
7.3.280.0100.00515.54
7.3.270.0080.00615.33
7.3.260.0070.00714.89
7.3.250.0080.00915.34
7.3.240.0050.00814.81
7.3.230.0080.00714.77
7.3.220.0040.00413.24
7.3.210.0050.00714.85
7.3.200.0050.00616.22
7.3.190.0040.00914.81
7.3.180.0080.00414.83
7.3.170.0080.00614.91
7.3.160.0060.00814.76
7.3.150.0050.00313.17
7.3.140.0040.00413.12
7.3.130.0100.00013.02
7.3.120.0020.00513.11
7.3.110.0050.00313.02
7.3.100.0080.00013.22
7.3.90.0040.00413.50
7.3.80.0000.00613.11
7.3.70.0000.00813.32
7.3.60.0000.00613.33
7.3.50.0060.00013.25
7.3.40.0080.00013.26
7.3.30.0040.00413.39
7.3.20.0030.00514.99
7.3.10.0060.00015.09
7.3.00.0000.00614.98
7.2.340.0110.00313.26
7.2.330.0090.00714.82
7.2.320.0090.00714.77
7.2.310.0130.00514.90
7.2.300.0060.00914.85
7.2.290.0090.00715.00
7.2.280.0090.00413.26
7.2.270.0050.00813.14
7.2.260.0090.00512.95
7.2.250.0090.00513.23
7.2.240.0100.00313.25
7.2.230.0070.00713.13
7.2.220.0130.00013.18
7.2.210.0110.00413.35
7.2.200.0110.00413.47
7.2.190.0140.00013.37
7.2.180.0100.00413.41
7.2.170.0080.00413.48
7.2.160.0100.00313.23
7.2.150.0090.00515.12
7.2.140.0110.00315.22
7.2.130.0110.00415.39
7.2.120.0090.00415.29
7.2.110.0100.00315.32
7.2.100.0120.00415.33
7.2.90.0160.00015.29
7.2.80.0140.00015.28
7.2.70.0050.00915.13
7.2.60.0090.00516.04
7.2.50.0080.00715.13
7.2.40.0110.00415.13
7.2.30.0090.00615.25
7.2.20.0110.00615.13
7.2.10.0130.00315.39
7.2.00.0100.00517.27
7.1.330.0040.00814.27
7.1.320.0040.00914.05
7.1.310.0110.00314.32
7.1.300.0080.00514.13
7.1.290.0140.00014.30
7.1.280.0060.00514.14
7.1.270.0090.00214.28
7.1.260.0080.00514.23
7.1.250.0110.00314.20
7.1.240.0080.00513.95
7.1.230.0060.00614.22
7.1.220.0080.00414.14
7.1.210.0090.00214.14
7.1.200.0080.00414.93
7.1.190.0120.00014.09
7.1.180.0040.00914.28
7.1.170.0100.00214.11
7.1.160.0060.00614.20
7.1.150.0090.00214.16
7.1.140.0060.00614.02
7.1.130.0130.00014.20
7.1.120.0100.00314.18
7.1.110.0090.00313.98
7.1.100.0100.00116.09
7.1.90.0100.00214.23
7.1.80.0090.00214.17
7.1.70.0060.00515.61
7.1.60.0100.00816.72
7.1.50.0110.00615.63
7.1.40.0120.00014.21
7.1.30.0040.00814.10
7.1.20.0000.01214.27
7.1.10.0040.00814.30
7.1.00.0050.04118.31
7.0.330.0120.00014.09
7.0.320.0090.00414.23
7.0.310.0070.00514.19
7.0.300.0120.00014.23
7.0.290.0120.00014.23
7.0.280.0060.00514.07
7.0.270.0080.00414.00
7.0.260.0110.00014.20
7.0.250.0100.00314.04
7.0.240.0060.00614.24
7.0.230.0090.00314.27
7.0.220.0120.00014.19
7.0.210.0080.00413.97
7.0.200.0050.00615.28
7.0.190.0100.00214.07
7.0.180.0110.00014.04
7.0.170.0120.00014.20
7.0.160.0120.00014.13
7.0.150.0060.00614.17
7.0.140.0020.04218.06
7.0.130.0110.00014.19
7.0.120.0090.00314.19
7.0.110.0090.00214.20
7.0.100.0120.00014.12
7.0.90.0090.01817.95
7.0.80.0060.02017.87
7.0.70.0080.04317.81
7.0.60.0040.02017.89
7.0.50.0090.01818.09
7.0.40.0020.03417.18
7.0.30.0080.02017.12
7.0.20.0050.02317.09
7.0.10.0050.02317.17
7.0.00.0020.02417.10
5.6.400.0080.00312.77
5.6.390.0000.01112.84
5.6.380.0080.00412.78
5.6.370.0110.00012.64
5.6.360.0120.00012.77
5.6.350.0070.00412.84
5.6.340.0040.00712.77
5.6.330.0050.00512.84
5.6.320.0110.00012.93
5.6.310.0080.00412.76
5.6.300.0080.00312.65
5.6.290.0040.00712.77
5.6.280.0060.03716.79
5.6.270.0070.00412.93
5.6.260.0080.00312.64
5.6.250.0080.00412.67
5.6.240.0060.02016.71
5.6.230.0050.02016.70
5.6.220.0070.02016.63
5.6.210.0030.04316.70
5.6.200.0060.02317.04
5.6.190.0070.01916.97
5.6.180.0060.01816.99
5.6.170.0060.01816.98
5.6.160.0070.02016.99
5.6.150.0050.02416.91
5.6.140.0110.01616.89
5.6.130.0070.02116.89
5.6.120.0100.03116.97
5.6.110.0050.02016.88
5.6.100.0060.02517.02
5.6.90.0030.02516.94
5.6.80.0060.01916.66
5.6.70.0060.02216.61
5.6.60.0070.02216.67
5.6.50.0090.03316.66
5.6.40.0090.03216.44
5.6.30.0030.04416.58
5.6.20.0050.03916.51
5.6.10.0070.03816.64
5.6.00.0100.03816.64
5.5.380.0090.02016.68
5.5.370.0050.02116.65
5.5.360.0030.02616.48
5.5.350.0050.02116.63
5.5.340.0080.02016.74
5.5.330.0060.02116.88
5.5.320.0050.02316.71
5.5.310.0040.02316.79
5.5.300.0030.02616.70
5.5.290.0060.02216.65
5.5.280.0060.02216.78
5.5.270.0060.02216.85
5.5.260.0060.02316.63
5.5.250.0060.01816.77
5.5.240.0040.02216.58
5.5.230.0110.02516.44
5.5.220.0060.02216.53
5.5.210.0050.03616.54
5.5.200.0070.03716.51
5.5.190.0040.04216.42
5.5.180.0100.03316.32
5.5.170.0120.00012.38
5.5.160.0090.03216.42
5.5.150.0100.03816.34
5.5.140.0080.04216.41
5.5.130.0070.03616.35
5.5.120.0080.03316.29
5.5.110.0060.04216.24
5.5.100.0080.03516.42
5.5.90.0130.03216.31
5.5.80.0090.03716.47
5.5.70.0060.04016.45
5.5.60.0060.03216.39
5.5.50.0060.03916.38
5.5.40.0070.03216.46
5.5.30.0080.03816.33
5.5.20.0040.03416.39
5.5.10.0090.03516.22
5.5.00.0090.03816.40
5.4.450.0050.01715.93
5.4.440.0030.01816.01
5.4.430.0080.01816.01
5.4.420.0060.01915.90
5.4.410.0060.02015.88
5.4.400.0050.02615.95
5.4.390.0060.02015.84
5.4.380.0050.02115.92
5.4.370.0060.03015.88
5.4.360.0110.03515.76
5.4.350.0030.04215.92
5.4.340.0070.02615.67
5.4.330.0110.00012.42
5.4.320.0040.02315.87
5.4.310.0070.03515.96
5.4.300.0050.04015.84
5.4.290.0090.03715.89
5.4.280.0090.03315.91
5.4.270.0060.03715.80
5.4.260.0060.03815.72
5.4.250.0040.04415.66
5.4.240.0090.03715.83
5.4.230.0070.02315.68
5.4.220.0050.03815.74
5.4.210.0110.03515.64
5.4.200.0090.03715.63
5.4.190.0050.04015.63
5.4.180.0080.03615.79
5.4.170.0060.02515.92
5.4.160.0050.02815.79
5.4.150.0060.03015.83
5.4.140.0040.02614.54
5.4.130.0030.02814.39
5.4.120.0040.04314.54
5.4.110.0050.02814.47
5.4.100.0080.03814.53
5.4.90.0070.03614.54
5.4.80.0020.02814.60
5.4.70.0030.03814.44
5.4.60.0040.02514.64
5.4.50.0040.03814.38
5.4.40.0050.03514.57
5.4.30.0050.03714.51
5.4.20.0050.03714.58
5.4.10.0040.03814.54
5.4.00.0070.03714.04
5.3.290.0020.03213.95
5.3.280.0050.03913.80
5.3.270.0040.04413.91
5.3.260.0060.03813.84
5.3.250.0050.03213.90
5.3.240.0060.03813.81
5.3.230.0090.03713.93
5.3.220.0060.03113.73
5.3.210.0060.03913.73
5.3.200.0030.04113.72
5.3.190.0030.04313.73
5.3.180.0090.03513.73
5.3.170.0050.03913.93
5.3.160.0030.03413.77
5.3.150.0070.02213.84
5.3.140.0040.03513.70
5.3.130.0040.03913.74
5.3.120.0060.03813.75
5.3.110.0060.04013.84
5.3.100.0040.04013.48
5.3.90.0070.02213.48
5.3.80.0060.01813.48
5.3.70.0090.03513.44
5.3.60.0020.04213.44
5.3.50.0060.02313.47
5.3.40.0080.03813.37
5.3.30.0050.03013.44
5.3.20.0060.03813.27
5.3.10.0060.02013.13
5.3.00.0090.03613.09
5.2.170.0000.03411.64
5.2.160.0020.03311.58
5.2.150.0040.03411.44
5.2.140.0040.03311.52
5.2.130.0040.02811.43
5.2.120.0050.02011.60
5.2.110.0050.03111.54
5.2.100.0040.03211.57
5.2.90.0020.03311.50
5.2.80.0020.03111.54
5.2.70.0060.03211.45
5.2.60.0080.03011.32
5.2.50.0070.03111.39
5.2.40.0030.03111.41
5.2.30.0010.03511.34
5.2.20.0090.02511.43
5.2.10.0030.02111.40
5.2.00.0050.02811.24
5.1.60.0030.02610.61
5.1.50.0030.01510.64
5.1.40.0000.03010.58
5.1.30.0040.02910.67
5.1.20.0000.03510.78
5.1.10.0000.02710.55
5.1.00.0020.01910.59
5.0.50.0030.01010.34
5.0.40.0030.02010.34
5.0.30.0030.03210.34
5.0.20.0050.02310.34
5.0.10.0020.01810.34
5.0.00.0030.03310.34
4.4.90.0030.01710.34
4.4.80.0070.01210.34
4.4.70.0020.01810.34
4.4.60.0020.01810.34
4.4.50.0020.01810.34
4.4.40.0020.01710.34
4.4.30.0030.00710.34
4.4.20.0020.00810.34
4.4.10.0020.01710.34
4.4.00.0000.03010.34
4.3.110.0020.01810.34
4.3.100.0010.01210.34
4.3.90.0040.01310.34
4.3.80.0020.02710.34
4.3.70.0050.01510.34
4.3.60.0020.01810.34
4.3.50.0050.01710.34
4.3.40.0020.02710.34
4.3.30.0000.02010.34
4.3.20.0030.01210.34
4.3.10.0020.01610.34
4.3.00.0040.01610.34

preferences:
59.58 ms | 401 KiB | 5 Q