3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * This file is part of the symfony framework. * * (c) Fabien Potencier <fabien.potencier@symfony-project.com> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ /** * RokCommon_Service_Container_AbstractLoader is the abstract class used by all built-in loaders that are file based. * * @package symfony * @subpackage dependency_injection * @author Fabien Potencier <fabien.potencier@symfony-project.com> * @version SVN: $Id: File.php 10831 2013-05-29 19:32:17Z btowles $ */ abstract class RokCommon_Service_Container_Loader_File extends RokCommon_Service_Container_AbstractLoader { protected $paths = array(); /** * Constructor. * * @param RokCommon_Service_Container_Builder $container A RokCommon_Service_Container_Builder instance * @param string|array $paths A path or an array of paths where to look for resources */ public function __construct(RokCommon_Service_Container_Builder $container = null, $paths = array()) { parent::__construct($container); if (!is_array($paths)) { $paths = array($paths); } $this->paths = $paths; } /** * Loads a resource. * * A resource is a file or an array of files. * * The concrete classes always have access to an array of files * as this method converts single file argument to an array. * * @param mixed $resource The resource path */ public function load($resource) { if (!is_array($resource)) { $resource = array($resource); } return parent::load($resource); } protected function getAbsolutePath($file, $currentPath = null) { if (self::isAbsolutePath($file)) { return $file; } else if (null !== $currentPath && file_exists($currentPath.DIRECTORY_SEPARATOR.$file)) { return $currentPath.DIRECTORY_SEPARATOR.$file; } else { foreach ($this->paths as $path) { if (file_exists($path.DIRECTORY_SEPARATOR.$file)) { return $path.DIRECTORY_SEPARATOR.$file; } } } return $file; } static protected function isAbsolutePath($file) { if ($file[0] == '/' || $file[0] == '\\' || (strlen($file) > 3 && ctype_alpha($file[0]) && $file[1] == ':' && ($file[2] == '\\' || $file[2] == '/') ) ) { return true; } return false; } }

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.0040.01118.68
8.3.50.0070.00717.98
8.3.40.0070.00718.83
8.3.30.0030.01019.22
8.3.20.0070.00020.16
8.3.10.0000.00823.48
8.3.00.0030.00520.82
8.2.180.0040.01117.00
8.2.170.0130.00322.96
8.2.160.0070.00720.35
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0120.00026.16
8.2.120.0050.00319.48
8.2.110.0050.00522.28
8.2.100.0000.01217.91
8.2.90.0040.00419.05
8.2.80.0050.00317.97
8.2.70.0000.00817.50
8.2.60.0040.00418.04
8.2.50.0030.00618.07
8.2.40.0050.00319.89
8.2.30.0040.00418.39
8.2.20.0000.00817.80
8.2.10.0030.00517.96
8.2.00.0040.00417.77
8.1.270.0000.00824.00
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00623.82
8.1.230.0040.00718.96
8.1.220.0060.00317.74
8.1.210.0030.00518.77
8.1.200.0060.00317.23
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0000.00818.54
8.1.160.0070.00022.09
8.1.150.0050.00318.52
8.1.140.0050.00217.46
8.1.130.0020.00519.55
8.1.120.0030.00317.43
8.1.110.0040.00417.47
8.1.100.0070.00017.43
8.1.90.0000.00817.42
8.1.80.0000.00717.41
8.1.70.0000.00917.35
8.1.60.0040.00817.52
8.1.50.0040.00417.54
8.1.40.0070.00317.50
8.1.30.0040.00417.58
8.1.20.0000.00717.51
8.1.10.0040.00417.46
8.1.00.0050.00317.48
8.0.300.0000.00818.77
8.0.290.0000.00817.05
8.0.280.0000.00718.46
8.0.270.0040.00417.20
8.0.260.0000.00717.29
8.0.250.0070.00017.08
8.0.240.0030.00516.94
8.0.230.0030.00317.04
8.0.220.0000.00616.89
8.0.210.0000.00616.97
8.0.200.0000.00616.96
8.0.190.0070.00416.98
8.0.180.0040.00417.05
8.0.170.0000.00817.04
8.0.160.0000.00817.01
8.0.150.0040.00417.02
8.0.140.0000.00716.91
8.0.130.0020.00513.38
8.0.120.0040.00416.98
8.0.110.0030.00516.84
8.0.100.0070.00016.83
8.0.90.0030.00516.87
8.0.80.0100.01017.04
8.0.70.0000.00716.94
8.0.60.0000.00717.03
8.0.50.0000.00716.81
8.0.30.0110.01017.12
8.0.20.0130.00817.40
8.0.10.0050.00216.89
8.0.00.0110.00716.82
7.4.330.0050.00015.13
7.4.320.0030.00316.55
7.4.300.0030.00316.61
7.4.290.0070.00016.52
7.4.280.0000.00716.59
7.4.270.0070.00016.55
7.4.260.0000.00716.48
7.4.250.0030.00316.41
7.4.240.0070.00016.45
7.4.230.0050.00216.66
7.4.220.0150.01116.50
7.4.210.0030.01216.61
7.4.200.0030.00316.65
7.4.160.0060.00916.53
7.4.150.0070.01117.40
7.4.140.0080.00817.86
7.4.130.0030.01416.55
7.4.120.0070.00916.38
7.4.110.0000.01716.52
7.4.100.0090.01016.42
7.4.90.0110.00616.45
7.4.80.0100.01319.39
7.4.70.0090.00916.69
7.4.60.0070.01316.63
7.4.50.0060.00316.27
7.4.40.0070.01016.62
7.4.30.0130.00316.54
7.4.00.0000.01515.12
7.3.330.0000.00813.20
7.3.320.0050.00013.19
7.3.310.0070.00016.23
7.3.300.0030.00316.22
7.3.290.0060.01416.47
7.3.280.0110.00616.32
7.3.270.0160.00617.40
7.3.260.0030.01516.59
7.3.250.0070.01016.48
7.3.240.0110.00516.55
7.3.230.0000.01916.39
7.3.210.0030.02016.47
7.3.200.0060.01519.39
7.3.190.0070.01416.51
7.3.180.0080.01316.32
7.3.170.0140.00616.44
7.3.160.0030.01316.55
7.3.120.0090.00615.06
7.2.330.0190.00016.52
7.2.320.0110.00616.33
7.2.310.0070.01116.41
7.2.300.0160.00616.59
7.2.290.0100.00716.18
7.2.60.0000.01216.85
7.2.00.0030.00919.35
7.1.200.0030.00715.70
7.1.100.0060.00617.84
7.1.70.0040.00417.04
7.1.60.0070.01719.70
7.1.50.0070.01316.73
7.1.00.0000.08022.31
7.0.200.0090.00316.54
7.0.140.0030.07722.08
7.0.80.0330.08020.04
7.0.70.0030.06020.04
7.0.60.0430.07019.98
7.0.50.0330.08320.42
7.0.40.0170.06320.08
7.0.30.0000.05020.05
7.0.20.0000.10020.14
7.0.10.0100.05320.16
7.0.00.0070.05320.18
5.6.280.0000.07720.97
5.6.230.0030.06720.64
5.6.220.0200.07320.73
5.6.210.0030.08720.76
5.6.200.0100.08321.02
5.6.190.0100.04021.12
5.6.180.0070.08321.04
5.6.170.0130.04021.11
5.6.160.0070.06721.03
5.6.150.0070.05721.15
5.6.140.0130.08021.00
5.6.130.0100.08321.07
5.6.120.0070.08321.15
5.6.110.0130.07721.03
5.6.100.0030.08321.04
5.6.90.0100.05321.16
5.6.80.0100.05320.50
5.6.70.0030.04720.47
5.6.60.0200.05320.50
5.6.50.0130.07720.41
5.6.40.0070.08320.33
5.6.30.0100.07320.45
5.6.20.0130.05320.47
5.6.10.0070.06720.32
5.6.00.0030.05320.43
5.5.370.0200.07320.43
5.5.360.0030.05320.43
5.5.350.0100.04320.35
5.5.340.0130.07720.79
5.5.330.0030.07720.94
5.5.320.0070.08320.88
5.5.310.0100.04320.65
5.5.300.0170.04020.79
5.5.290.0070.04720.77
5.5.280.0130.07020.66
5.5.270.0070.04720.80
5.5.260.0070.07020.77
5.5.250.0130.05020.46
5.5.240.0170.05020.20
5.5.230.0130.05720.30
5.5.220.0100.05020.31
5.5.210.0070.06020.21
5.5.200.0200.04720.10
5.5.190.0030.05320.24
5.5.180.0170.08320.28
5.5.160.0000.05320.00
5.5.150.0130.04320.14
5.5.140.0070.03720.15
5.5.130.0000.04320.23
5.5.120.0000.06320.23
5.5.110.0030.04720.16
5.5.100.0070.04319.97
5.5.90.0000.04320.08
5.5.80.0070.04320.07
5.5.70.0070.07320.07
5.5.60.0000.04320.11
5.5.50.0030.04320.04
5.5.40.0030.07319.95
5.5.30.0100.03319.96
5.5.20.0070.07720.07
5.5.10.0130.07320.02
5.5.00.0100.04020.04
5.4.450.0030.07719.46
5.4.440.0000.05319.52
5.4.430.0100.05319.35
5.4.420.0100.06319.35
5.4.410.0100.04319.33
5.4.400.0070.05319.16
5.4.390.0030.08019.03
5.4.380.0100.06719.09
5.4.370.0200.07019.03
5.4.360.0030.06318.91
5.4.350.0070.07319.18
5.4.340.0100.06319.05
5.4.320.0070.07019.21
5.4.310.0000.08319.21
5.4.300.0070.07719.21
5.4.290.0130.05018.90
5.4.280.0100.04019.03
5.4.270.0100.05319.09
5.4.260.0100.04719.13
5.4.250.0070.03719.11
5.4.240.0070.06719.16
5.4.230.0130.06318.91
5.4.220.0000.08319.04
5.4.210.0030.05019.18
5.4.200.0030.04319.03
5.4.190.0030.04319.02
5.4.180.0070.04719.11
5.4.170.0130.04319.09
5.4.160.0130.07019.02
5.4.150.0100.03319.21
5.4.140.0030.04316.46
5.4.130.0030.05016.45
5.4.120.0030.05316.45
5.4.110.0270.05016.34
5.4.100.0030.04016.36
5.4.90.0070.07016.41
5.4.80.0030.07316.35
5.4.70.0130.03316.47
5.4.60.0130.03316.40
5.4.50.0100.04016.47
5.4.40.0030.04716.53
5.4.30.0070.06316.32
5.4.20.0000.07716.45
5.4.10.0030.04016.29
5.4.00.0000.07315.88
5.3.290.0100.07714.66
5.3.280.0030.04014.73
5.3.270.0000.06314.61
5.3.260.0100.03314.65
5.3.250.0070.07314.71
5.3.240.0100.07314.68
5.3.230.0030.04714.75
5.3.220.0100.03014.55
5.3.210.0130.03314.60
5.3.200.0030.07014.53
5.3.190.0130.06714.56
5.3.180.0100.03714.50
5.3.170.0030.07714.50
5.3.160.0100.06014.50
5.3.150.0000.08014.53
5.3.140.0070.07014.59
5.3.130.0170.03314.48
5.3.120.0070.07714.57
5.3.110.0100.05714.59
5.3.100.0100.02714.05
5.3.90.0070.07014.00
5.3.80.0170.04014.15
5.3.70.0070.07014.05
5.3.60.0070.05714.05
5.3.50.0000.07314.01
5.3.40.0000.06714.01
5.3.30.0030.05313.82
5.3.20.0030.05313.63
5.3.10.0030.06313.70
5.3.00.0070.03313.70
5.2.170.0070.06011.86
5.2.160.0030.05711.86
5.2.150.0030.04311.86
5.2.140.0070.07011.86
5.2.130.0130.05011.86
5.2.120.0070.03011.86
5.2.110.0030.06311.86
5.2.100.0000.06011.86
5.2.90.0070.05311.86
5.2.80.0100.05311.86
5.2.70.0130.03711.86
5.2.60.0100.04311.86
5.2.50.0030.06311.86
5.2.40.0030.04311.86
5.2.30.0070.05311.86
5.2.20.0070.03011.86
5.2.10.0100.05711.86
5.2.00.0070.05011.86
5.1.60.0030.05011.86
5.1.50.0070.03311.86
5.1.40.0130.04011.86
5.1.30.0030.04711.86
5.1.20.0130.04711.86
5.1.10.0070.05011.86
5.1.00.0070.05011.86
5.0.50.0030.03711.86
5.0.40.0000.03711.86
5.0.30.0030.05711.86
5.0.20.0070.03011.86
5.0.10.0000.02311.86
5.0.00.0070.06311.86
4.4.90.0070.01311.86
4.4.80.0030.01711.86
4.4.70.0000.02011.86
4.4.60.0070.01711.86
4.4.50.0000.03311.86
4.4.40.0070.04311.86
4.4.30.0030.01311.86
4.4.20.0070.01311.86
4.4.10.0000.02711.86
4.4.00.0000.05711.86
4.3.110.0000.03711.86
4.3.100.0070.02311.86
4.3.90.0030.01711.86
4.3.80.0000.05311.86
4.3.70.0030.02711.86
4.3.60.0070.03311.86
4.3.50.0000.02711.86
4.3.40.0030.04311.86
4.3.30.0000.02011.86
4.3.20.0000.03711.86
4.3.10.0030.01311.86
4.3.00.0000.03011.86

preferences:
50.04 ms | 400 KiB | 5 Q