3v4l.org

run code in 300+ PHP versions simultaneously
<?php $scandir = "home:///Pierpaolo/file.txt"; $scandir = preg_replace("/\/$/", "", $scandir); $scandir = preg_replace("/\/\.\.\/?/", "/", $scandir); $scandir = preg_replace("/\/$/", "", $scandir); echo $scandir; if ( (preg_match("/^([A-z0-9\-_]+)?\:\/\/?(.*)/", $scandir, $matches)) !== false ) { if ( sizeof($matches) === 3 ) { $protocol = "{$matches[1]}://"; $dirname = $matches[2]; } } echo $protocol." - ".$dirname ;

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.0190.00317.00
8.3.50.0140.00521.22
8.3.40.0120.00318.94
8.3.30.0070.00718.84
8.3.20.0080.00020.30
8.3.10.0080.00021.90
8.3.00.0060.00323.66
8.2.180.0110.00716.88
8.2.170.0040.01122.96
8.2.160.0100.00319.50
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00419.95
8.2.120.0040.00426.35
8.2.110.0040.00422.24
8.2.100.0040.00817.93
8.2.90.0050.00319.20
8.2.80.0060.00318.04
8.2.70.0060.00317.88
8.2.60.0090.00017.93
8.2.50.0000.00818.07
8.2.40.0090.00022.39
8.2.30.0000.00819.41
8.2.20.0000.00818.02
8.2.10.0030.00518.04
8.2.00.0000.00818.04
8.1.280.0040.01125.92
8.1.270.0080.00020.33
8.1.260.0030.00528.09
8.1.250.0040.00428.09
8.1.240.0000.00923.85
8.1.230.0040.00719.10
8.1.220.0040.00417.78
8.1.210.0060.00318.77
8.1.200.0000.00917.47
8.1.190.0040.00417.25
8.1.180.0000.00818.10
8.1.170.0000.00918.57
8.1.160.0000.00720.80
8.1.150.0040.00418.92
8.1.140.0000.00819.62
8.1.130.0030.00317.79
8.1.120.0000.00717.64
8.1.110.0040.00417.53
8.1.100.0070.00017.63
8.1.90.0030.00517.69
8.1.80.0040.00417.51
8.1.70.0030.00317.52
8.1.60.0000.00717.66
8.1.50.0000.00817.59
8.1.40.0030.00617.72
8.1.30.0000.00817.86
8.1.20.0050.00217.84
8.1.10.0080.00017.78
8.1.00.0080.00017.70
8.0.300.0070.00018.77
8.0.290.0050.00216.88
8.0.280.0000.00718.53
8.0.270.0060.00317.17
8.0.260.0030.00317.21
8.0.250.0000.00817.00
8.0.240.0080.00017.15
8.0.230.0030.00317.15
8.0.220.0040.00416.94
8.0.210.0070.00016.96
8.0.200.0030.00317.10
8.0.190.0110.00417.03
8.0.180.0040.00417.01
8.0.170.0030.00517.10
8.0.160.0030.00617.04
8.0.150.0000.00717.02
8.0.140.0060.00616.98
8.0.130.0030.00313.53
8.0.120.0090.00016.91
8.0.110.0070.00016.95
8.0.100.0040.00417.08
8.0.90.0070.00017.00
8.0.80.0030.01217.06
8.0.70.0040.00416.95
8.0.60.0080.00017.05
8.0.50.0040.00416.89
8.0.30.0080.00917.24
8.0.20.0100.00917.47
8.0.10.0000.00717.18
8.0.00.0110.00816.97
7.4.330.0030.00216.68
7.4.320.0070.00016.80
7.4.300.0030.00516.65
7.4.290.0000.00716.68
7.4.280.0030.00616.76
7.4.270.0040.00416.84
7.4.260.0000.00716.62
7.4.250.0080.00016.71
7.4.240.0030.00516.76
7.4.230.0050.00316.95
7.4.220.0170.00716.77
7.4.210.0000.01416.93
7.4.200.0000.00716.90
7.4.160.0090.00616.54
7.4.150.0090.00917.40
7.4.140.0080.01317.86
7.4.130.0130.00516.88
7.4.120.0080.01016.72
7.4.110.0090.01416.77
7.4.100.0030.01316.86
7.4.90.0100.00716.77
7.4.80.0100.01019.39
7.4.70.0170.00016.93
7.4.60.0060.01316.76
7.4.50.0080.00616.72
7.4.40.0100.00716.72
7.4.30.0140.00316.84
7.4.00.0070.01014.91
7.3.330.0000.00513.43
7.3.320.0000.00513.25
7.3.310.0030.00316.55
7.3.300.0030.00316.49
7.3.290.0080.00816.40
7.3.280.0070.01016.43
7.3.270.0060.01217.40
7.3.260.0090.00916.67
7.3.250.0110.00616.48
7.3.240.0090.01016.66
7.3.230.0130.01016.74
7.3.210.0080.00816.73
7.3.200.0150.00919.39
7.3.190.0030.01916.46
7.3.180.0120.00916.68
7.3.170.0080.00816.53
7.3.160.0130.01016.38
7.3.10.0030.00816.73
7.3.00.0050.00916.79
7.2.330.0060.01216.99
7.2.320.0090.00916.74
7.2.310.0170.00716.77
7.2.300.0130.00916.79
7.2.290.0160.00616.83
7.2.130.0050.00917.04
7.2.120.0060.00717.09
7.2.110.0060.00817.09
7.2.100.0030.01217.04
7.2.90.0050.00617.07
7.2.80.0090.00517.21
7.2.70.0070.00816.98
7.2.60.0060.00516.91
7.2.50.0020.01117.09
7.2.40.0070.00417.02
7.2.30.0070.00517.20
7.2.20.0060.00817.12
7.2.10.0060.00616.97
7.2.00.0080.00517.92
7.1.250.0020.01216.08
7.1.240.0040.00415.79
7.1.230.0030.01015.93
7.1.220.0030.01015.91
7.1.210.0030.01015.93
7.1.200.0040.00716.00
7.1.190.0030.01315.75
7.1.180.0070.00716.07
7.1.170.0040.00416.09
7.1.160.0030.00716.18
7.1.150.0100.00316.15
7.1.140.0040.00415.77
7.1.130.0070.00716.08
7.1.120.0040.00415.95
7.1.110.0030.01215.93
7.1.100.0090.00317.16
7.1.90.0110.00015.98
7.1.80.0070.00716.14
7.1.70.0040.00516.67
7.1.60.0080.01117.63
7.1.50.0120.00516.60
7.1.40.0060.00316.03
7.1.30.0100.00615.98
7.1.20.0040.00416.07
7.1.10.0040.01116.16
7.1.00.0050.04219.16
7.0.330.0000.00715.59
7.0.320.0070.00315.29
7.0.310.0000.01115.28
7.0.300.0040.01115.47
7.0.290.0090.00315.58
7.0.280.0000.01515.58
7.0.270.0000.01015.41
7.0.260.0090.00615.30
7.0.250.0050.00515.65
7.0.240.0070.00715.71
7.0.230.0000.01115.71
7.0.220.0070.00715.69
7.0.210.0110.00315.73
7.0.200.0030.00716.28
7.0.190.0000.00815.48
7.0.180.0090.00615.37
7.0.170.0060.00915.53
7.0.160.0070.00715.63
7.0.150.0060.00915.55
7.0.140.0100.00315.75
7.0.130.0030.00915.34
7.0.120.0060.00315.43
7.0.110.0060.00315.66
7.0.100.0040.00715.82
7.0.90.0030.00715.69
7.0.80.0060.00615.55
7.0.70.0040.00415.48
7.0.60.0070.03818.50
7.0.50.0120.04016.76
7.0.40.0080.03316.89
7.0.30.0160.03916.87
7.0.20.0220.03916.78
7.0.10.0040.04916.92
7.0.00.0100.03316.72
5.6.380.0000.01214.29
5.6.370.0110.00014.34
5.6.360.0110.00014.45
5.6.350.0060.00314.32
5.6.340.0060.00614.13
5.6.330.0070.00414.63
5.6.320.0030.00614.13
5.6.310.0090.00614.76
5.6.300.0000.01314.27
5.6.290.0000.01414.52
5.6.280.0080.02517.66
5.6.270.0030.01314.57
5.6.260.0100.00314.39
5.6.250.0100.00314.36
5.6.240.0040.01114.46
5.6.230.0050.00514.57
5.6.220.0060.01014.21
5.6.210.0070.03017.58
5.6.200.0080.03516.22
5.6.190.0130.03717.40
5.6.180.0200.04217.48
5.6.170.0170.04217.46
5.6.160.0090.02517.29
5.6.150.0050.03216.28
5.6.140.0080.03416.27
5.6.130.0030.03316.42
5.6.120.0050.03217.78
5.6.110.0070.04417.63
5.6.100.0000.03517.72
5.6.90.0110.04317.80
5.6.80.0110.03517.28
5.6.70.0100.00314.36
5.6.60.0000.01414.20
5.6.50.0060.00614.27
5.6.40.0040.01214.13
5.6.30.0000.00814.49
5.6.20.0000.01514.30
5.6.10.0100.00614.54
5.6.00.0070.00714.36
5.5.380.0030.00711.32
5.5.370.0000.01111.11
5.5.360.0030.00710.90
5.5.350.0020.02315.69
5.5.340.0050.02614.45
5.5.330.0070.03915.74
5.5.320.0330.03515.79
5.5.310.0160.02115.82
5.5.300.0090.04214.52
5.5.290.0080.02614.45
5.5.280.0050.02416.14
5.5.270.0080.02815.98
5.5.260.0070.02316.04
5.5.250.0020.02315.85
5.5.240.0120.03915.55
5.5.230.0060.00310.66
5.5.220.0030.00310.84
5.5.210.0070.00011.14
5.5.200.0060.00611.21
5.5.190.0040.00811.18
5.5.180.0080.00310.98
5.5.170.0060.00610.66
5.5.160.0070.00311.15
5.5.150.0000.01211.14
5.5.140.0030.00611.34
5.5.130.0030.00310.91
5.5.120.0030.00510.89
5.5.110.0090.00311.05
5.5.100.0070.00410.76
5.5.90.0030.00311.15
5.5.80.0030.00610.87
5.5.70.0040.00410.91
5.5.60.0090.00311.08
5.5.50.0030.00611.10
5.5.40.0100.00311.10
5.5.30.0000.01310.86
5.5.20.0000.01311.01
5.5.10.0030.01010.79
5.5.00.0030.00911.14

preferences:
60.8 ms | 401 KiB | 5 Q