3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Aydin; class Directory { public $dir = ''; public $parts = []; } class Vhost { public $directories = []; } $vhost =' <Directory "/srv/httpd/htdocs/mydomain.com"> Options Indexes FollowSymLinks AllowOverride All Order deny,allow Allow from 127.0.0.1 Allow from xxx.xxx.xxx.xxx Allow from xxx.xxx.xxx.xxx Deny from all </Directory> <Directory "/srv/httpd/htdocs/myseconddomain"> Options Indexes FollowSymLinks AllowOverride All Order deny,allow Allow from 127.0.0.1 Allow from xxx.xxx.xxx.xxx Allow from xxx.xxx.xxx.xxx Deny from all </Directory> '; $matches = []; $directory = preg_match_all('/<Directory "(.*")>([\s\S]*?)<\/Directory>/', $vhost, $matches, PREG_SET_ORDER); $vhost = new Vhost; foreach ($matches as $match) { $dir = new Directory; $dir->dir = $match[1]; //echo "Directory: " . $match[1] . "\n"; $lines = explode($match[2], "\n"); foreach ($lines as $line) { $parts = preg_split('/\s+/', $line); $dir->parts[] = $parts; } $vhost->directories[] = $dir; } var_dump($vhost);

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.0140.00718.68
8.3.50.0100.00922.11
8.3.40.0040.01119.07
8.3.30.0070.00719.13
8.3.20.0040.00420.35
8.3.10.0030.00620.65
8.3.00.0050.00319.51
8.2.180.0120.00618.23
8.2.170.0140.00722.96
8.2.160.0100.00320.47
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0030.00618.79
8.2.110.0000.01022.20
8.2.100.0080.00418.03
8.2.90.0040.00419.38
8.2.80.0090.00017.97
8.2.70.0040.00417.73
8.2.60.0060.00318.16
8.2.50.0060.00318.07
8.2.40.0000.01018.34
8.2.30.0000.00719.21
8.2.20.0060.00317.88
8.2.10.0050.00318.16
8.2.00.0080.00017.97
8.1.280.0090.00925.92
8.1.270.0100.00023.83
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.79
8.1.230.0120.00019.02
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0030.00617.48
8.1.190.0000.00817.23
8.1.180.0080.00018.10
8.1.170.0040.00418.78
8.1.160.0030.00622.04
8.1.150.0000.00818.91
8.1.140.0000.00717.60
8.1.130.0030.00317.85
8.1.120.0040.00417.68
8.1.110.0040.00417.63
8.1.100.0050.00217.66
8.1.90.0000.00717.52
8.1.80.0040.00417.50
8.1.70.0000.00717.58
8.1.60.0030.00617.73
8.1.50.0030.00617.70
8.1.40.0000.00917.63
8.1.30.0030.00617.77
8.1.20.0030.00517.65
8.1.10.0040.00417.54
8.1.00.0040.00417.48
8.0.300.0080.00018.77
8.0.290.0060.00316.75
8.0.280.0000.00818.46
8.0.270.0040.00717.19
8.0.260.0070.00017.27
8.0.250.0000.00717.08
8.0.240.0050.00317.12
8.0.230.0000.00817.08
8.0.220.0030.00317.00
8.0.210.0020.00517.00
8.0.200.0030.00616.99
8.0.190.0000.00817.05
8.0.180.0040.00417.05
8.0.170.0080.00016.96
8.0.160.0040.00416.91
8.0.150.0050.00216.88
8.0.140.0080.00016.92
8.0.130.0060.00013.51
8.0.120.0060.00317.04
8.0.110.0040.00416.97
8.0.100.0040.00417.10
8.0.90.0040.00417.06
8.0.80.0120.00316.95
8.0.70.0040.00417.02
8.0.60.0030.00516.93
8.0.50.0050.00317.05
8.0.30.0140.00717.09
8.0.20.0190.00617.40
8.0.10.0000.00717.14
8.0.00.0090.01116.91
7.4.330.0000.00515.12
7.4.320.0030.00316.83
7.4.300.0070.00016.81
7.4.290.0040.00416.68
7.4.280.0040.00416.68
7.4.270.0070.00016.73
7.4.260.0040.00416.76
7.4.250.0040.00416.54
7.4.240.0020.00616.75
7.4.230.0000.00716.90
7.4.220.0100.01016.89
7.4.210.0030.01016.75
7.4.200.0090.00016.74
7.4.160.0030.01316.62
7.4.150.0090.00917.40
7.4.140.0110.00717.86
7.4.130.0090.01116.78
7.4.120.0100.00816.72
7.4.110.0030.01416.59
7.4.100.0170.00616.59
7.4.90.0230.00316.66
7.4.80.0110.00719.04
7.4.70.0100.00716.78
7.4.60.0180.00016.68
7.4.50.0050.00316.64
7.4.40.0100.01016.78
7.4.30.0120.00616.79
7.4.00.0090.00614.83
7.3.330.0000.00613.51
7.3.320.0050.00013.28
7.3.310.0050.00216.49
7.3.300.0070.00016.43
7.3.290.0140.00016.52
7.3.280.0080.00916.50
7.3.270.0090.00917.40
7.3.260.0180.00016.94
7.3.250.0110.01016.64
7.3.240.0150.00416.59
7.3.230.0060.01516.70
7.3.210.0110.00716.63
7.3.200.0030.01519.39
7.3.190.0070.01016.60
7.3.180.0060.00916.49
7.3.170.0060.01116.70
7.3.160.0060.01016.52
7.2.330.0120.00616.88
7.2.320.0130.01016.88
7.2.310.0110.00716.93
7.2.300.0100.00716.77
7.2.290.0120.00616.86
7.2.00.0090.00319.79
7.1.100.0060.00618.39
7.1.70.0080.00017.37
7.1.60.0130.01319.32
7.1.50.0080.00417.03
7.1.00.0000.08022.37
7.0.200.0030.00716.93
7.0.140.0000.07322.07
7.0.60.0030.05319.98
7.0.50.0030.04017.93
7.0.40.0000.04720.29
7.0.30.0330.06720.12
7.0.20.0300.07720.28
7.0.10.0030.05320.07
7.0.00.0130.04720.22
5.6.280.0030.07321.10
5.6.210.0100.07720.52
5.6.200.0070.07018.29
5.6.190.0000.04720.60
5.6.180.0400.08020.77
5.6.170.0300.04020.39
5.6.160.0070.07020.54
5.6.150.0130.04018.16
5.6.140.0030.05318.18
5.6.130.0100.05318.22
5.6.120.0070.08321.02
5.6.110.0100.08721.02
5.6.100.0000.07321.01
5.6.90.0100.07020.97
5.6.80.0030.08320.39
5.5.350.0230.07320.45
5.5.340.0100.07717.98
5.5.330.0200.05320.13
5.5.320.0100.08020.38
5.5.310.0200.04320.37
5.5.300.0030.08017.95
5.5.290.0030.08717.93
5.5.280.0070.07020.66
5.5.270.0030.05720.86
5.5.260.0030.06720.68
5.5.250.0030.05720.76
5.5.240.0200.07320.27
5.4.450.0130.04719.55
5.4.440.0770.05719.63
5.4.430.0830.05019.45
5.4.420.0700.00019.34
5.4.410.0670.00019.26
5.4.400.0600.00018.92
5.4.390.0630.00019.21
5.4.380.0230.06018.70
5.4.370.0470.05318.50
5.4.360.0370.06018.53
5.4.350.0400.06718.72
5.4.340.0400.04318.70
5.4.320.0060.04512.51
5.4.310.0060.03712.51
5.4.300.0060.04212.51
5.4.290.0080.04612.51
5.4.280.0100.04112.40
5.4.270.0100.04812.40
5.4.260.0100.03412.40
5.4.250.0070.03712.40
5.4.240.0030.03912.40
5.4.230.0060.04012.39
5.4.220.0050.04512.39
5.4.210.0080.03812.39
5.4.200.0060.04912.39
5.4.190.0060.04112.39
5.4.180.0080.05812.39
5.4.170.0110.04412.40
5.4.160.0090.03912.40
5.4.150.0050.03612.39
5.4.140.0080.04512.07
5.4.130.0070.03312.07
5.4.120.0050.04612.02
5.4.110.0060.04812.02
5.4.100.0080.04912.02
5.4.90.0040.04712.02
5.4.80.0060.03812.02
5.4.70.0060.03412.02
5.4.60.0050.03512.02
5.4.50.0060.03512.02
5.4.40.0050.03512.00
5.4.30.0060.03512.00
5.4.20.0040.03711.99
5.4.10.0060.03412.00
5.4.00.0030.03811.49
5.3.290.0100.04112.80
5.3.280.0110.03212.71
5.3.270.0060.03812.73
5.3.260.0070.03712.71
5.3.250.0050.03812.72
5.3.240.0080.03412.72
5.3.230.0070.03512.71
5.3.220.0110.04412.68
5.3.210.0070.04212.68
5.3.200.0110.04012.68
5.3.190.0060.04312.68
5.3.180.0070.03512.67
5.3.170.0080.04612.67
5.3.160.0060.03512.67
5.3.150.0050.03812.67
5.3.140.0070.03612.66
5.3.130.0070.04312.66
5.3.120.0100.04912.66
5.3.110.0050.05512.66
5.3.100.0060.03712.12
5.3.90.0040.03812.10
5.3.80.0060.03512.09
5.3.70.0050.03712.09
5.3.60.0050.04312.08
5.3.50.0080.03312.02
5.3.40.0060.04112.02
5.3.30.0050.03611.98
5.3.20.0050.03711.76
5.3.10.0070.04711.73
5.3.00.0070.05011.71
5.2.170.0040.0309.18
5.2.160.0030.0309.18
5.2.150.0050.0369.18
5.2.140.0080.0389.18
5.2.130.0050.0299.14
5.2.120.0060.0459.14
5.2.110.0050.0289.14
5.2.100.0020.0359.14
5.2.90.0030.0309.14
5.2.80.0050.0299.14
5.2.70.0080.0279.14
5.2.60.0030.0319.09
5.2.50.0070.0389.06
5.2.40.0040.0439.04
5.2.30.0060.0289.02
5.2.20.0060.0339.01
5.2.10.0070.0338.92
5.2.00.0030.0378.79
5.1.60.0070.0278.07
5.1.50.0060.0238.06
5.1.40.0020.0278.04
5.1.30.0060.0358.39
5.1.20.0010.0308.42
5.1.10.0040.0328.14
5.1.00.0030.0388.14
5.0.50.0040.0216.63
5.0.40.0030.0196.48
5.0.30.0040.0386.29
5.0.20.0030.0196.26
5.0.10.0040.0246.25
5.0.00.0040.0306.23
4.4.90.0020.0304.78
4.4.80.0020.0154.76
4.4.70.0020.0324.76
4.4.60.0050.0134.75
4.4.50.0050.0184.77
4.4.40.0050.0324.71
4.4.30.0040.0224.76
4.4.20.0020.0164.84
4.4.10.0050.0204.85
4.4.00.0020.0254.76
4.3.110.0040.0174.67
4.3.100.0030.0144.66
4.3.90.0030.0144.63
4.3.80.0030.0294.58
4.3.70.0020.0154.63
4.3.60.0030.0254.63
4.3.50.0050.0194.63
4.3.40.0020.0304.54
4.3.30.0020.0153.28
4.3.20.0040.0213.26
4.3.10.0020.0153.22
4.3.00.0000.02315.60

preferences:
39.92 ms | 401 KiB | 5 Q