3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Path { public $currentPath; private $array; function __construct($path) { $this->currentPath = $path; $array = explode("/", $path); print_r($array); } public function cd($newPath) { throw new Exception('Not implemented'); } } $path = new Path('/a/b/c/d');

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.0110.00716.50
8.3.50.0100.01021.98
8.3.40.0090.00618.68
8.3.30.0140.00018.42
8.3.20.0040.00420.22
8.3.10.0070.00023.46
8.3.00.0080.00818.97
8.2.180.0060.01316.38
8.2.170.0070.00722.96
8.2.160.0070.00720.52
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0030.00626.16
8.2.120.0040.00419.13
8.2.110.0030.00620.43
8.2.100.0040.00817.68
8.2.90.0040.00419.09
8.2.80.0040.00417.97
8.2.70.0040.00417.38
8.2.60.0050.00517.80
8.2.50.0080.00018.07
8.2.40.0000.00821.03
8.2.30.0040.00420.63
8.2.20.0000.00717.64
8.2.10.0000.00817.88
8.2.00.0030.00618.00
8.1.280.0120.00325.92
8.1.270.0080.00823.92
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00322.20
8.1.230.0040.00719.15
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.00917.35
8.1.190.0000.00817.76
8.1.180.0000.00818.10
8.1.170.0030.00518.64
8.1.160.0000.00721.87
8.1.150.0040.00418.70
8.1.140.0040.00417.33
8.1.130.0000.00817.69
8.1.120.0040.00417.45
8.1.110.0000.00917.31
8.1.100.0000.00717.35
8.1.90.0070.00017.39
8.1.80.0030.00417.32
8.1.70.0000.00717.27
8.1.60.0070.00317.47
8.1.50.0030.00517.53
8.1.40.0050.00317.51
8.1.30.0090.00017.65
8.1.20.0050.00217.61
8.1.10.0000.00717.51
8.1.00.0050.00317.34
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0030.00318.32
8.0.270.0000.00716.70
8.0.260.0060.00017.11
8.0.250.0040.00316.86
8.0.240.0070.00016.89
8.0.230.0030.00316.88
8.0.220.0030.00316.88
8.0.210.0040.00416.87
8.0.200.0070.00016.85
8.0.190.0070.00016.87
8.0.180.0030.00516.89
8.0.170.0080.00016.74
8.0.160.0000.00716.79
8.0.150.0030.00316.80
8.0.140.0000.00816.78
8.0.130.0030.00313.30
8.0.120.0040.00416.78
8.0.110.0070.00016.84
8.0.100.0040.00416.80
8.0.90.0000.00716.90
8.0.80.0040.01116.76
8.0.70.0040.00416.70
8.0.60.0030.00516.86
8.0.50.0030.00516.86
8.0.30.0130.00717.16
8.0.20.0080.01217.40
8.0.10.0040.00416.79
8.0.00.0150.00616.70
7.4.330.0020.00216.71
7.4.320.0030.00316.52
7.4.300.0030.00316.57
7.4.290.0000.00716.43
7.4.280.0080.00016.40
7.4.270.0030.00316.43
7.4.260.0040.00416.47
7.4.250.0000.00816.39
7.4.240.0040.00416.55
7.4.230.0030.00316.34
7.4.220.0160.01016.44
7.4.210.0090.00616.43
7.4.200.0000.00716.55
7.4.160.0120.00816.41
7.4.150.0090.01517.40
7.4.140.0070.01117.86
7.4.130.0110.00916.43
7.4.120.0050.01216.48
7.4.110.0100.01316.43
7.4.100.0200.00516.58
7.4.90.0120.00616.42
7.4.80.0060.01519.39
7.4.70.0100.01016.44
7.4.60.0070.01016.60
7.4.50.0120.00016.16
7.4.40.0030.01416.41
7.4.30.0060.01116.55
7.4.10.0090.00614.91
7.4.00.0090.00914.87
7.3.330.0030.00313.20
7.3.320.0000.00513.23
7.3.310.0060.00016.25
7.3.300.0000.00716.25
7.3.290.0080.00616.22
7.3.280.0080.00616.16
7.3.270.0070.01717.40
7.3.260.0170.00016.23
7.3.250.0090.00916.26
7.3.240.0080.01016.18
7.3.230.0030.01316.39
7.3.210.0060.01016.50
7.3.200.0050.01116.49
7.3.190.0100.01016.54
7.3.180.0150.00616.13
7.3.170.0030.01316.54
7.3.160.0030.01616.34
7.3.130.0050.01014.57
7.3.120.0090.00914.62
7.3.110.0080.00814.71
7.3.100.0060.01014.65
7.3.90.0070.00714.81
7.3.80.0030.01014.75
7.3.70.0030.00814.59
7.3.60.0020.00814.72
7.3.50.0070.00614.51
7.3.40.0030.00714.71
7.3.30.0040.01114.74
7.3.20.0110.00216.46
7.3.10.0050.00616.40
7.3.00.0040.01016.53
7.2.330.0070.01016.54
7.2.320.0060.00916.59
7.2.310.0060.01216.66
7.2.300.0090.00616.61
7.2.290.0090.00916.77
7.2.260.0070.00614.89
7.2.250.0070.00914.99
7.2.240.0080.00814.82
7.2.230.0030.01114.91
7.2.220.0050.00814.95
7.2.210.0060.00415.13
7.2.200.0070.00614.87
7.2.190.0100.00315.03
7.2.180.0050.01014.99
7.2.170.0040.00714.97
7.2.160.0060.01015.04
7.2.150.0040.01016.65
7.2.140.0080.00616.65
7.2.130.0090.00816.68
7.2.120.0050.00916.93
7.2.110.0080.00916.74
7.2.100.0040.01216.77
7.2.90.0020.01016.91
7.2.80.0080.00616.87
7.2.70.0070.00716.86
7.2.60.0080.00716.87
7.2.50.0060.00916.78
7.2.40.0060.01016.75
7.2.30.0090.00916.79
7.2.20.0070.00816.75
7.2.10.0070.01016.81
7.2.00.0060.00817.24
7.1.330.0050.01015.65
7.1.320.0020.01015.82
7.1.310.0060.00615.73
7.1.300.0070.00515.73
7.1.290.0060.00715.63
7.1.280.0060.00415.82
7.1.270.0080.00415.77
7.1.260.0040.01015.72
7.1.250.0100.00615.76
7.1.240.0080.00415.74
7.1.230.0040.01015.73
7.1.220.0080.00815.76
7.1.210.0080.00615.82
7.1.200.0050.00815.81
7.1.190.0060.00815.80
7.1.180.0080.00615.62
7.1.170.0060.00615.71
7.1.160.0080.00515.72
7.1.150.0040.00815.72
7.1.140.0070.00815.78
7.1.130.0060.00915.72
7.1.120.0020.01015.82
7.1.110.0070.00815.65
7.1.100.0080.00616.23
7.1.90.0060.00815.69
7.1.80.0040.00815.73
7.1.70.0050.00715.84
7.1.60.0050.01016.39
7.1.50.0070.00615.86
7.1.40.0060.00815.73
7.1.30.0070.00715.70
7.1.20.0060.00615.62
7.1.10.0060.00815.62
7.1.00.0050.02117.05
7.0.330.0080.00715.33
7.0.320.0070.00715.33
7.0.310.0060.00915.38
7.0.300.0060.00815.17
7.0.290.0040.00715.36
7.0.280.0070.00515.35
7.0.270.0030.00815.40
7.0.260.0030.00915.44
7.0.250.0080.00415.30
7.0.240.0050.00715.33
7.0.230.0040.01015.39
7.0.220.0040.00915.27
7.0.210.0050.00615.39
7.0.200.0060.00815.66
7.0.190.0040.01015.37
7.0.180.0060.00815.47
7.0.170.0040.00515.34
7.0.160.0030.01015.23
7.0.150.0060.00515.44
7.0.140.0060.00715.30
7.0.130.0050.00815.38
7.0.120.0050.00715.40
7.0.110.0060.00715.37
7.0.100.0040.00915.41
7.0.90.0050.00815.34
7.0.80.0050.01115.48
7.0.70.0060.00715.35
7.0.60.0090.02116.25
7.0.50.0040.02415.91
7.0.40.0040.01414.76
7.0.30.0100.01814.75
7.0.20.0080.01714.77
7.0.10.0070.01214.70
7.0.00.0100.02114.78
5.6.400.0070.00614.33
5.6.390.0050.00514.28
5.6.380.0070.00714.37
5.6.370.0070.00714.44
5.6.360.0060.00614.28
5.6.350.0060.00614.29
5.6.340.0060.00614.57
5.6.330.0070.00614.30
5.6.320.0070.00814.39
5.6.310.0070.00514.40
5.6.300.0070.00714.15
5.6.290.0050.00814.10
5.6.280.0040.01215.75
5.6.270.0060.00614.38
5.6.260.0050.00714.36
5.6.250.0060.00714.21
5.6.240.0070.00814.25
5.6.230.0040.00614.43
5.6.220.0070.00714.17
5.6.210.0080.02315.63
5.6.200.0040.01515.04
5.6.190.0050.01515.62
5.6.180.0160.01615.59
5.6.170.0120.02115.50
5.6.160.0060.01715.63
5.6.150.0080.02115.02
5.6.140.0060.02215.09
5.6.130.0030.01615.00
5.6.120.0050.01715.71
5.6.110.0090.02015.73
5.6.100.0070.01715.74
5.6.90.0090.01915.72
5.6.80.0050.01915.51
5.6.70.0030.00914.24
5.6.60.0040.01014.21
5.6.50.0070.00714.26
5.6.40.0080.00814.21
5.6.30.0040.00914.31
5.6.20.0050.00714.28
5.6.10.0070.00814.23
5.6.00.0070.00414.31
5.5.380.0030.01113.47
5.5.370.0040.00613.50
5.5.360.0070.00413.29
5.5.350.0070.01814.88
5.5.340.0050.02214.18
5.5.330.0060.02314.80
5.5.320.0060.02314.79
5.5.310.0110.01414.92
5.5.300.0070.02014.38
5.5.290.0050.02114.45
5.5.280.0030.02614.95
5.5.270.0040.01314.72
5.5.260.0080.01914.84
5.5.250.0060.02014.74
5.5.240.0080.02014.67
5.5.230.0040.00913.25
5.5.220.0060.00713.41
5.5.210.0040.01013.31
5.5.200.0070.00613.38
5.5.190.0040.01013.21
5.5.180.0040.00613.33
5.5.170.0080.00413.41
5.5.160.0090.00513.40
5.5.150.0070.00513.34
5.5.140.0060.00813.33
5.5.130.0070.00613.32
5.5.120.0060.00613.47
5.5.110.0070.00613.52
5.5.100.0030.01013.41
5.5.90.0090.00713.27
5.5.80.0040.00713.27
5.5.70.0060.00613.31
5.5.60.0040.00813.33
5.5.50.0070.00513.29
5.5.40.0040.00713.37
5.5.30.0060.00713.55
5.5.20.0070.00613.21
5.5.10.0020.00913.35
5.5.00.0060.00813.27

preferences:
56.61 ms | 401 KiB | 5 Q