3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Piwik - free/libre analytics platform * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ namespace Piwik; use Piwik\Tests\Framework\Mock\File; function filesize($filename) { if (File::getFileSize() !== null) { return File::getFileSize(); } return \filesize($filename); } function file_exists($filename) { if (File::getFileExists() !== null) { return File::getFileExists(); } return \file_exists($filename); } class Test { public static function tester() { return file_exists('test'); } } namespace Piwik\Tests\Framework\Mock; class File { static $filesize = null; static $fileExists = null; public static function getFileSize() { return self::$filesize; } public static function setFileSize($filesize) { self::$filesize = $filesize; } public static function reset() { self::$filesize = null; self::$fileExists = null; } public static function getFileExists() { return self::$fileExists; } public static function setFileExists($exists) { self::$fileExists = $exists; } } File::setFileSize(1024 * 1024 * 101); File::setFileExists(true); var_dump(\Piwik\Test::tester());

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.0070.01116.50
8.3.60.0110.00318.55
8.3.50.0120.00922.05
8.3.40.0140.00318.68
8.3.30.0110.00419.05
8.3.20.0060.00320.22
8.3.10.0050.00320.53
8.3.00.0040.00419.26
8.2.190.0110.00316.75
8.2.180.0110.00416.63
8.2.170.0110.00422.96
8.2.160.0100.00320.38
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0050.00226.16
8.2.120.0050.00319.54
8.2.110.0030.00721.08
8.2.100.0060.00617.50
8.2.90.0040.00419.22
8.2.80.0050.00317.97
8.2.70.0000.00917.63
8.2.60.0060.00318.04
8.2.50.0040.00418.07
8.2.40.0070.00018.16
8.2.30.0060.00318.00
8.2.20.0000.00717.69
8.2.10.0050.00218.02
8.2.00.0000.00817.59
8.1.280.0190.00325.92
8.1.270.0100.00020.44
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0090.00023.88
8.1.230.0110.00018.72
8.1.220.0030.00617.74
8.1.210.0080.00018.77
8.1.200.0090.00017.23
8.1.190.0090.00017.10
8.1.180.0070.00018.10
8.1.170.0050.00318.53
8.1.160.0000.00722.02
8.1.150.0040.00418.85
8.1.140.0020.00517.45
8.1.130.0030.00717.70
8.1.120.0000.00817.36
8.1.110.0040.00417.42
8.1.100.0040.00417.41
8.1.90.0030.00517.38
8.1.80.0070.00017.26
8.1.70.0030.00317.36
8.1.60.0070.00317.56
8.1.50.0030.00617.56
8.1.40.0000.00817.52
8.1.30.0030.00517.65
8.1.20.0000.00817.71
8.1.10.0020.00517.52
8.1.00.0040.00417.49
8.0.300.0030.00518.77
8.0.290.0070.00016.63
8.0.280.0030.00318.40
8.0.270.0030.00616.75
8.0.260.0000.00717.09
8.0.250.0030.00316.79
8.0.240.0000.00616.90
8.0.230.0030.00316.81
8.0.220.0070.00016.82
8.0.210.0030.00316.85
8.0.200.0040.00416.87
8.0.190.0070.00016.84
8.0.180.0000.00716.91
8.0.170.0070.00016.94
8.0.160.0040.00416.82
8.0.150.0040.00416.75
8.0.140.0000.00716.69
8.0.130.0050.00013.34
8.0.120.0030.00514.93
8.0.110.0000.00715.00
8.0.100.0040.00415.01
8.0.90.0020.00715.08
8.0.80.0070.00715.09
8.0.70.0050.00514.96
8.0.60.0040.00515.05
8.0.50.0100.00014.91
8.0.30.0110.00915.84
8.0.20.0100.00616.04
8.0.10.0070.00315.15
8.0.00.0040.00915.85
7.4.330.0000.00615.02
7.4.320.0070.00016.61
7.4.300.0030.00316.54
7.4.290.0030.00316.62
7.4.280.0050.00316.63
7.4.270.0030.00316.52
7.4.260.0050.00216.43
7.4.250.0070.00414.93
7.4.240.0060.00415.50
7.4.230.0060.00514.87
7.4.220.0080.00614.96
7.4.210.0060.00814.98
7.4.200.0070.00215.01
7.4.190.0040.00813.44
7.4.180.0120.00013.42
7.4.160.0080.00514.94
7.4.150.0110.00215.35
7.4.140.0070.00716.25
7.4.130.0090.00715.42
7.4.120.0110.00815.41
7.4.110.0090.00714.85
7.4.100.0110.00314.92
7.4.90.0060.00814.86
7.4.80.0050.01016.29
7.4.70.0120.00214.83
7.4.60.0050.00814.81
7.4.50.0030.00414.88
7.4.40.0090.00514.82
7.4.30.0070.00714.89
7.4.20.0000.00713.16
7.4.10.0060.00714.16
7.4.00.0080.00614.38
7.3.330.0060.00013.29
7.3.320.0000.00613.21
7.3.310.0040.00514.80
7.3.300.0050.00314.71
7.3.290.0080.00615.58
7.3.280.0060.01015.61
7.3.270.0070.00815.38
7.3.260.0130.00315.01
7.3.250.0100.00615.26
7.3.240.0060.00814.85
7.3.230.0110.00514.92
7.3.220.0080.00413.28
7.3.210.0120.00314.87
7.3.200.0110.00516.32
7.3.190.0090.00814.98
7.3.180.0060.00714.68
7.3.170.0110.00314.87
7.3.160.0090.00414.75
7.3.150.0100.00013.23
7.3.140.0050.00513.08
7.3.130.0110.00214.21
7.3.120.0090.00613.96
7.3.110.0070.00713.95
7.3.100.0060.00513.85
7.3.90.0080.00614.14
7.3.80.0020.01314.04
7.3.70.0070.00614.06
7.3.60.0020.01114.11
7.3.50.0040.01114.06
7.3.40.0040.00814.14
7.3.30.0060.00514.02
7.3.20.0070.00415.91
7.3.10.0070.00615.97
7.3.00.0080.00216.14
7.2.340.0070.00713.08
7.2.330.0100.00615.04
7.2.320.0070.00914.94
7.2.310.0060.00914.96
7.2.300.0080.00914.95
7.2.290.0030.01314.91
7.2.280.0080.00413.35
7.2.270.0090.00413.30
7.2.260.0080.00713.98
7.2.250.0060.00614.14
7.2.240.0020.01214.10
7.2.230.0060.00914.10
7.2.220.0010.01414.01
7.2.210.0080.00614.10
7.2.200.0070.00614.19
7.2.190.0110.00314.15
7.2.180.0090.00514.16
7.2.170.0080.00614.22
7.2.160.0090.00514.21
7.2.150.0100.00216.16
7.2.140.0100.00216.09
7.2.130.0050.00816.43
7.2.120.0080.00516.29
7.2.110.0090.00416.21
7.2.100.0060.00516.34
7.2.90.0080.00616.30
7.2.80.0080.00516.34
7.2.70.0050.00916.26
7.2.60.0070.00816.48
7.2.50.0050.00816.23
7.2.40.0070.00716.29
7.2.30.0090.00416.32
7.2.20.0030.00816.26
7.2.10.0040.00916.40
7.2.00.0060.00717.15
7.1.330.0060.00615.06
7.1.320.0060.00715.08
7.1.310.0070.00515.13
7.1.300.0080.00615.10
7.1.290.0090.00314.98
7.1.280.0020.01114.81
7.1.270.0080.00514.94
7.1.260.0030.00914.92
7.1.250.0030.00815.15
7.1.240.0070.00414.94
7.1.230.0050.00914.93
7.1.220.0100.00314.95
7.1.210.0060.00715.04
7.1.200.0070.00615.14
7.1.190.0070.00415.06
7.1.180.0060.00714.92
7.1.170.0060.00614.97
7.1.160.0100.00314.99
7.1.150.0040.00714.96
7.1.140.0050.00914.83
7.1.130.0020.01115.04
7.1.120.0060.00514.96
7.1.110.0070.00715.01
7.1.100.0090.00315.90
7.1.90.0040.00814.93
7.1.80.0070.00514.98
7.1.70.0060.00415.64
7.1.60.0090.00516.35
7.1.50.0120.00415.63
7.1.40.0060.00414.92
7.1.30.0070.00514.99
7.1.20.0060.00614.88
7.1.10.0080.00514.85
7.1.00.0080.02817.48
7.0.330.0060.00614.79
7.0.320.0070.00614.84
7.0.310.0050.00514.73
7.0.300.0070.00414.75
7.0.290.0050.00814.60
7.0.280.0070.00414.93
7.0.270.0100.00214.69
7.0.260.0070.00414.78
7.0.250.0120.00114.71
7.0.240.0080.00114.86
7.0.230.0070.00314.91
7.0.220.0060.00614.63
7.0.210.0060.00714.73
7.0.200.0060.00415.45
7.0.190.0070.00414.76
7.0.180.0060.00614.81
7.0.170.0090.00314.88
7.0.160.0050.00814.65
7.0.150.0060.00614.66
7.0.140.0040.02717.23
7.0.130.0060.00614.93
7.0.120.0070.00614.83
7.0.110.0100.00414.80
7.0.100.0030.01014.69
7.0.90.0060.00414.73
7.0.80.0060.00614.66
7.0.70.0080.00614.68
7.0.60.0070.02416.49
7.0.50.0070.01915.86
7.0.40.0040.03415.93
7.0.30.0120.03315.98
7.0.20.0170.01815.88
7.0.10.0120.03015.89
7.0.00.0040.02115.88
5.6.400.0060.00813.73
5.6.390.0080.00513.67
5.6.380.0040.00713.46
5.6.370.0070.00413.54
5.6.360.0030.00713.66
5.6.350.0060.00613.55
5.6.340.0060.00513.60
5.6.330.0090.00113.45
5.6.320.0070.00313.51
5.6.310.0090.00113.49
5.6.300.0050.00513.47
5.6.290.0070.00513.60
5.6.280.0060.02816.07
5.6.270.0090.00313.52
5.6.260.0050.00713.62
5.6.250.0050.00713.53
5.6.240.0070.00413.52
5.6.230.0080.00513.63
5.6.220.0100.00313.62
5.6.210.0130.03015.93
5.6.200.0090.02315.11
5.6.190.0080.02015.98
5.6.180.0130.01916.01
5.6.170.0150.02915.89
5.6.160.0060.02115.94
5.6.150.0060.01915.04
5.6.140.0070.02215.10
5.6.130.0070.03215.12
5.6.120.0090.02516.17
5.6.110.0070.02716.03
5.6.100.0090.03116.08
5.6.90.0080.01816.01
5.6.80.0050.02915.86
5.6.70.1500.01615.80
5.6.60.0040.00613.64
5.6.50.0080.00413.44
5.6.40.0080.00513.52
5.6.30.0060.00713.51
5.6.20.0070.00513.36
5.6.10.0030.00713.37
5.6.00.0070.00313.63
5.5.380.0050.00613.59
5.5.370.0070.00513.47
5.5.360.0070.00813.40
5.5.350.0080.01315.82
5.5.340.0080.01714.90
5.5.330.0040.02115.72
5.5.320.0140.02915.90
5.5.310.0150.02415.90
5.5.300.0040.01814.97
5.5.290.0100.02314.97
5.5.280.0080.02615.91
5.5.270.0070.01915.81
5.5.260.0040.03215.98
5.5.250.0050.02815.86
5.5.240.0080.02915.68
5.5.230.0130.00013.45
5.5.220.0070.00213.48
5.5.210.0090.00313.42
5.5.200.0000.01413.52
5.5.190.0080.00313.41
5.5.180.0070.00513.49
5.5.170.0070.00413.54
5.5.160.0040.00813.45
5.5.150.0040.00713.37
5.5.140.0100.00313.54
5.5.130.0080.00513.46
5.5.120.0050.00513.43
5.5.110.0080.00213.38
5.5.100.0060.00513.44
5.5.90.0070.00313.55
5.5.80.0030.00913.40
5.5.70.0040.00813.39
5.5.60.0050.00413.52
5.5.50.0050.00613.64
5.5.40.0050.00713.49
5.5.30.0050.00813.77
5.5.20.0040.00813.33
5.5.10.0110.00113.35
5.5.00.0100.00313.40
5.4.450.0100.02214.86
5.4.440.0320.02214.77
5.4.430.0330.02314.68
5.4.420.0080.02014.80
5.4.410.0100.02014.75
5.4.400.0060.02414.69
5.4.390.0090.02514.71
5.4.380.0090.02114.63
5.4.370.0090.01814.63
5.4.360.0090.02114.63
5.4.350.0090.02014.61
5.4.340.0030.01712.27
5.4.330.0070.00512.40
5.4.320.0060.01512.46
5.4.310.0070.01612.43
5.4.300.0060.01612.52
5.4.290.0090.01512.41
5.4.280.0080.01312.44
5.4.270.0080.01612.34
5.4.260.0080.01512.42
5.4.250.0070.01412.34
5.4.240.0070.01612.40
5.4.230.0110.01112.38
5.4.220.0050.01512.35
5.4.210.0060.01712.37
5.4.200.0090.01512.38
5.4.190.0060.01512.37
5.4.180.0060.01612.26
5.4.170.0060.01612.37
5.4.160.0040.01912.38
5.4.150.0070.01412.34
5.4.140.0050.01812.19
5.4.130.0050.01712.29
5.4.120.0070.01312.26
5.4.110.0050.01612.28
5.4.100.0040.01512.24
5.4.90.0050.01512.25
5.4.80.0070.01412.31
5.4.70.0040.01812.29
5.4.60.0070.01512.28
5.4.50.0070.01712.28
5.4.40.0050.02012.30
5.4.30.0060.02012.21
5.4.20.0040.02112.29
5.4.10.0060.02012.24
5.4.00.0100.01512.06
5.3.290.0040.02512.96
5.3.280.0080.02212.90
5.3.270.0100.02212.98
5.3.260.0050.02612.81
5.3.250.0090.02212.80
5.3.240.0050.02412.75
5.3.230.0100.01812.93
5.3.220.0110.01712.76
5.3.210.0060.02212.89
5.3.200.0060.02212.73
5.3.190.0090.02312.77
5.3.180.0100.02412.84
5.3.170.0080.02412.80
5.3.160.0070.02412.86
5.3.150.0070.02312.87
5.3.140.0100.02312.90
5.3.130.0070.02412.91
5.3.120.0100.01912.77
5.3.110.0060.02512.79
5.3.100.0050.02212.65
5.3.90.0090.02012.57
5.3.80.0110.01912.58
5.3.70.0050.02412.58
5.3.60.0060.02212.52
5.3.50.0080.01912.56
5.3.40.0090.01912.55
5.3.30.0070.01912.60
5.3.20.0090.01612.44
5.3.10.0060.02212.29
5.3.00.0080.02112.22
5.2.170.0050.01710.46
5.2.160.0080.01510.52
5.2.150.0040.01810.41
5.2.140.0070.01610.37
5.2.130.0050.01810.37
5.2.120.0050.01810.49
5.2.110.0070.01510.51
5.2.100.0090.01410.49
5.2.90.0040.01810.48
5.2.80.0060.01710.31
5.2.70.0050.01710.42
5.2.60.0040.01910.29
5.2.50.0040.01910.44
5.2.40.0050.01710.42
5.2.30.0050.01710.38
5.2.20.0090.01510.17
5.2.10.0070.01510.14
5.2.00.0020.01810.04
5.1.60.0020.0169.31
5.1.50.0050.0139.45
5.1.40.0040.0149.55
5.1.30.0060.0139.76
5.1.20.0050.0149.59
5.1.10.0050.0169.40
5.1.00.0070.0139.32
5.0.50.0050.0118.50
5.0.40.0050.0108.43
5.0.30.0060.0168.34
5.0.20.0020.0148.32
5.0.10.0030.0148.31
5.0.00.0050.0168.31
4.4.90.0020.0097.58
4.4.80.0030.0097.57
4.4.70.0020.0097.57
4.4.60.0030.0087.57
4.4.50.0040.0087.58
4.4.40.0020.0157.54
4.4.30.0010.0107.57
4.4.20.0030.0107.62
4.4.10.0030.0097.62
4.4.00.0030.0147.57
4.3.110.0020.0097.53
4.3.100.0030.0097.53
4.3.90.0040.0077.51
4.3.80.0040.0137.49
4.3.70.0020.0087.51
4.3.60.0030.0107.51
4.3.50.0030.0087.50
4.3.40.0030.0167.46
4.3.30.0020.0106.83
4.3.20.0020.0096.82
4.3.10.0020.0096.80
4.3.00.0100.0158.63

preferences:
81.86 ms | 401 KiB | 5 Q