3v4l.org

run code in 300+ PHP versions simultaneously
<?php $addr = "http://www.example.com/?pk_lol=VAgin&utm_campaign=printemps&utm_medium=e-mail&utm_source=newsletter1&utm_content=lien-en-haut"; $pattern ="/^(utm_source=)?([^&]+)/i"; preg_match($pattern, $addr, $result); echo $result[1]."\n"; // repérer le nom de l'hôte dans l'URL preg_match('@^(?:http://)?([^/]+)@i', "http://www.php.net/index.html", $matches); $host = $matches[0]; echo "OOoo: {$host}\n"; // repérer les deux derniers segments du nom de l'hôte preg_match('/[^.]+\.[^.]+$/', $host, $matches); echo "Le nom de domaine est : {$matches[0]}\n"; ?> echo $addr;

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.01216.63
8.3.50.0240.00517.31
8.3.40.0070.01019.09
8.3.30.0110.00418.80
8.3.20.0050.00318.89
8.3.10.0030.00720.79
8.3.00.0040.00419.38
8.2.180.0070.00716.88
8.2.170.0070.00722.96
8.2.160.0140.00720.90
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00420.71
8.2.110.0030.00721.04
8.2.100.0070.00418.03
8.2.90.0110.00019.51
8.2.80.0020.00519.28
8.2.70.0040.00417.75
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0080.00018.01
8.2.20.0040.00419.72
8.2.10.0040.00417.96
8.2.00.0070.00017.88
8.1.280.0150.00625.92
8.1.270.0040.00423.99
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0090.00320.68
8.1.230.0110.00020.87
8.1.220.0000.00817.79
8.1.210.0000.00818.97
8.1.200.0030.00617.48
8.1.190.0050.00217.40
8.1.180.0050.00518.10
8.1.170.0040.00418.86
8.1.160.0020.00518.96
8.1.150.0000.00718.85
8.1.140.0040.00417.54
8.1.130.0000.00717.84
8.1.120.0080.00017.62
8.1.110.0040.00417.66
8.1.100.0040.00417.65
8.1.90.0040.00317.51
8.1.80.0070.00017.55
8.1.70.0030.00317.51
8.1.60.0000.00817.80
8.1.50.0000.00817.49
8.1.40.0050.00317.73
8.1.30.0050.00317.77
8.1.20.0040.00417.79
8.1.10.0060.00317.77
8.1.00.0030.00617.63
8.0.300.0070.00019.91
8.0.290.0000.00816.88
8.0.280.0030.00318.47
8.0.270.0050.00317.31
8.0.260.0000.00716.89
8.0.250.0030.00517.11
8.0.240.0070.00017.02
8.0.230.0000.00717.16
8.0.220.0070.00017.04
8.0.210.0050.00216.91
8.0.200.0040.00417.10
8.0.190.0080.00017.04
8.0.180.0080.00016.93
8.0.170.0060.00316.94
8.0.160.0050.00317.04
8.0.150.0030.00617.05
8.0.140.0080.00317.01
8.0.130.0030.00313.36
8.0.120.0000.00816.99
8.0.110.0040.00417.07
8.0.100.0020.00516.85
8.0.90.0040.00416.87
8.0.80.0150.00616.98
8.0.70.0050.00217.07
8.0.60.0020.00516.94
8.0.50.0040.00416.99
8.0.30.0120.00617.43
8.0.20.0130.00616.97
8.0.10.0040.00417.13
8.0.00.0140.01016.95
7.4.330.0050.00013.15
7.4.320.0000.00616.68
7.4.300.0080.00016.75
7.4.290.0040.00416.62
7.4.280.0000.00816.77
7.4.270.0040.00416.66
7.4.260.0000.00513.35
7.4.250.0040.00416.75
7.4.240.0040.00416.74
7.4.230.0000.00716.50
7.4.220.0160.00916.81
7.4.210.0110.00316.68
7.4.200.0070.00016.64
7.4.190.0030.00616.88
7.4.160.0130.00316.46
7.4.150.0090.00916.60
7.4.140.0140.00316.77
7.4.130.0060.01316.77
7.4.120.0120.00616.61
7.4.110.0160.00716.65
7.4.100.0120.00616.75
7.4.90.0070.01116.71
7.4.80.0130.01016.59
7.4.70.0120.00416.64
7.4.60.0030.01316.64
7.4.50.0030.00516.61
7.4.40.0070.01016.71
7.4.30.0070.01016.81
7.4.00.0070.00915.20
7.3.330.0000.00613.23
7.3.320.0060.00013.16
7.3.310.0000.00716.48
7.3.300.0040.00416.47
7.3.290.0100.00616.40
7.3.280.0050.01216.42
7.3.270.0120.00616.71
7.3.260.0080.00816.84
7.3.250.0110.00916.61
7.3.240.0040.01216.50
7.3.230.0170.00016.50
7.3.210.0120.00616.48
7.3.200.0030.01419.39
7.3.190.0170.00016.82
7.3.180.0100.00716.50
7.3.170.0090.00916.77
7.3.160.0080.00816.78
7.3.120.0050.01115.13
7.3.110.0040.01215.20
7.3.100.0070.01015.31
7.3.90.0040.01415.11
7.3.80.0030.00914.98
7.3.70.0040.00815.09
7.3.60.0060.00314.87
7.3.50.0060.00315.11
7.3.40.0030.01314.83
7.3.30.0030.01015.04
7.3.20.0060.00616.90
7.3.10.0060.00916.68
7.3.00.0080.00716.78
7.2.330.0120.00616.80
7.2.320.0080.00816.89
7.2.310.0110.00716.96
7.2.300.0080.01416.69
7.2.290.0120.00616.82
7.2.250.0140.00715.30
7.2.240.0060.01315.21
7.2.230.0070.01015.43
7.2.220.0030.01015.03
7.2.210.0030.00714.96
7.2.200.0060.00615.23
7.2.190.0150.00015.20
7.2.180.0100.00715.15
7.2.170.0090.00614.92
7.2.130.0060.00616.88
7.2.120.0090.00317.17
7.2.110.0000.01416.87
7.2.100.0030.00717.18
7.2.90.0060.01016.78
7.2.80.0030.00717.04
7.2.70.0100.00316.98
7.2.60.0060.00616.82
7.2.50.0070.00716.98
7.2.40.0070.00716.81
7.2.30.0030.00717.30
7.2.20.0070.00716.75
7.2.10.0110.00417.21
7.2.00.0050.01218.25
7.1.330.0030.01315.91
7.1.320.0060.00315.85
7.1.310.0040.00715.96
7.1.300.0070.00415.86
7.1.290.0030.00915.52
7.1.280.0070.00315.61
7.1.270.0040.00816.08
7.1.260.0000.01115.88
7.1.250.0070.00716.00
7.1.240.0030.01015.51
7.1.230.0030.00715.91
7.1.220.0070.00715.77
7.1.210.0030.01315.81
7.1.200.0030.01016.14
7.1.190.0040.00715.69
7.1.180.0090.00615.97
7.1.170.0130.00315.95
7.1.160.0030.00615.98
7.1.150.0100.00615.87
7.1.140.0100.00015.66
7.1.130.0070.00715.98
7.1.120.0040.00715.87
7.1.110.0030.01015.52
7.1.100.0070.00717.35
7.1.90.0070.00715.96
7.1.80.0000.00916.09
7.1.70.0040.00716.39
7.1.60.0090.00617.58
7.1.50.0100.00716.28
7.1.40.0030.00715.68
7.1.30.0080.00315.81
7.1.20.0000.01515.85
7.1.10.0070.00715.98
7.1.00.0050.02519.01
7.0.330.0000.01315.52
7.0.320.0100.00315.11
7.0.310.0060.00615.60
7.0.300.0040.00415.65
7.0.290.0080.00415.49
7.0.280.0060.00615.56
7.0.270.0090.00615.53
7.0.260.0000.01215.46
7.0.250.0030.01015.55
7.0.240.0040.01115.47
7.0.230.0030.01315.49
7.0.220.0060.00915.55
7.0.210.0000.00915.50
7.0.200.0130.00315.38
7.0.190.0030.01015.70
7.0.180.0100.00315.53
7.0.170.0000.00915.45
7.0.160.0040.01115.49
7.0.150.0060.00315.34
7.0.140.0050.04018.70
7.0.130.0040.00815.69
7.0.120.0050.04018.63
7.0.110.0040.00815.57
7.0.100.0040.01115.45
7.0.90.0060.00315.16
7.0.80.0050.00515.19
7.0.70.0060.00615.45
7.0.60.0070.04117.80
7.0.50.0090.02516.86
7.0.40.0060.05016.92
7.0.30.0290.02216.67
7.0.20.0230.02316.86
7.0.10.0120.02617.03
7.0.00.0050.02216.74
5.6.380.0030.00713.98
5.6.370.0030.01414.16
5.6.360.0100.00714.46
5.6.350.0030.00614.58
5.6.340.0060.00614.56
5.6.330.0090.00314.04
5.6.320.0030.00614.16
5.6.310.0030.01014.35
5.6.300.0100.00314.12
5.6.290.0070.00714.32
5.6.280.0050.03817.78
5.6.270.0030.00914.31
5.6.260.0030.00714.20
5.6.250.0100.00314.29
5.6.240.0000.01114.43
5.6.230.0000.01014.52
5.6.220.0000.01014.47
5.6.210.0070.02817.46
5.6.200.0070.04516.41
5.6.190.0080.03617.41
5.6.180.0150.04417.55
5.6.170.0100.03017.49
5.6.160.0090.02117.34
5.6.150.0070.04016.10
5.6.140.0050.04316.22
5.6.130.0060.03816.37
5.6.120.0060.02517.79
5.6.110.0050.02717.74
5.6.100.0100.04517.60
5.6.90.0100.04217.70
5.6.80.0100.03717.34
5.6.70.0180.04017.23
5.6.60.0030.01014.21
5.6.50.0040.01114.26
5.6.40.0070.00714.15
5.6.30.0090.00314.00
5.6.20.0090.00614.37
5.6.10.0000.01114.13
5.6.00.0100.00314.18
5.5.380.0000.00811.18
5.5.370.0000.01111.18
5.5.360.0030.00911.35
5.5.350.0130.01615.82
5.5.340.0070.04514.54
5.5.330.0060.04615.62
5.5.320.0180.04315.69
5.5.310.0170.01915.75
5.5.300.0050.03314.56
5.5.290.0020.02514.60
5.5.280.0050.03315.99
5.5.270.0020.03916.01
5.5.260.0030.02516.02
5.5.250.0030.03715.93
5.5.240.0060.04115.60
5.5.230.0100.00311.18
5.5.220.0100.00311.18
5.5.210.0000.01111.18
5.5.200.0000.01011.18
5.5.190.0000.00911.20
5.5.180.0030.01011.18
5.5.170.0040.00711.18
5.5.160.0030.00911.20
5.5.150.0040.00411.18
5.5.140.0070.00411.18
5.5.130.0000.01111.18
5.5.120.0040.00411.18
5.5.110.0000.01011.18
5.5.100.0100.00011.33
5.5.90.0030.00711.24
5.5.80.0040.01111.18
5.5.70.0050.00311.18
5.5.60.0060.00311.18
5.5.50.0030.00611.18
5.5.40.0080.00311.18
5.5.30.0040.00711.23
5.5.20.0060.00611.18
5.5.10.0110.00411.18
5.5.00.0040.01111.18
5.4.450.0970.02315.34
5.4.440.0850.02415.39
5.4.430.0900.02315.37
5.4.420.0970.02515.19
5.4.410.0970.02215.24
5.4.400.0950.02215.21
5.4.390.0940.02315.06
5.4.380.0840.02015.17
5.4.370.0830.02115.16
5.4.360.0860.01915.21
5.4.350.0980.02715.15
5.4.340.0930.02215.15
5.4.330.0060.00611.18
5.4.320.0930.03015.15
5.4.310.0930.02315.15
5.4.300.0940.02315.14
5.4.290.0850.02515.13
5.4.280.0970.02615.11
5.4.270.0920.02715.13
5.4.260.1020.02515.17
5.4.250.0960.02615.15
5.4.240.0940.02714.99
5.4.230.0910.02315.13
5.4.220.0830.02315.03
5.4.210.0910.02314.97
5.4.200.0850.02515.04
5.4.190.0820.02814.98
5.4.180.0940.02615.12
5.4.170.0900.02515.17
5.4.160.1070.02515.04
5.4.150.0850.02415.14
5.4.140.0920.01813.74
5.4.130.0850.02113.91
5.4.120.0050.02113.77
5.4.110.0000.02613.78
5.4.100.0350.02013.83
5.4.90.0850.02313.78
5.4.80.0870.01913.93
5.4.70.0850.01413.70
5.4.60.0870.02013.68
5.4.50.0770.02213.67
5.4.40.0860.02013.81
5.4.30.0720.02413.83
5.4.20.0840.02013.73
5.4.10.0870.01913.66
5.4.00.0920.01913.48
5.3.290.1050.02812.84
5.3.280.0780.02012.81
5.3.270.0780.02012.84
5.3.260.1020.02012.82
5.3.250.0920.02512.82
5.3.240.0800.02012.87
5.3.230.0850.02312.86
5.3.220.0900.02412.80
5.3.210.0910.02012.79
5.3.200.0920.02712.85
5.3.190.1050.02512.79
5.3.180.0940.02212.80
5.3.170.0820.02312.91
5.3.160.0820.02012.84
5.3.150.0050.02312.84
5.3.140.0020.02212.79
5.3.130.0040.02412.87
5.3.120.0650.03312.78
5.3.110.1070.03112.84
5.3.100.1030.02812.56
5.3.90.0970.02212.61
5.3.80.1150.01712.54
5.3.70.1130.02012.54
5.3.60.0900.02412.51
5.3.50.1000.02412.54
5.3.40.0900.02012.61
5.3.30.0850.02312.52
5.3.20.0910.02512.36
5.3.10.0930.02312.41
5.3.00.0830.02512.40
5.2.170.0780.02211.24
5.2.160.0830.01611.08
5.2.150.0720.01311.09
5.2.140.0750.02211.08
5.2.130.1030.01611.22
5.2.120.0710.01811.06
5.2.110.0800.01711.14
5.2.100.0930.01811.06
5.2.90.0850.01511.14
5.2.80.0970.02011.06
5.2.70.0950.01911.09
5.2.60.0800.01811.04
5.2.50.1010.02011.10
5.2.40.0680.01711.01
5.2.30.0820.01911.12
5.2.20.0730.02511.09
5.2.10.0780.01310.98
5.2.00.0740.02010.90
5.1.60.0700.01910.62
5.1.50.0720.01710.53
5.1.40.0600.01010.56
5.1.30.0580.01310.76
5.1.20.0550.01710.75
5.1.10.0600.01110.56
5.1.00.0680.01710.63
5.0.50.0300.0139.88
5.0.40.0270.0129.81
5.0.30.0320.0159.71
5.0.20.0280.0139.68
5.0.10.0300.0129.64
5.0.00.0330.0139.63
4.4.90.0200.0129.49
4.4.80.0280.0109.49
4.4.70.0300.0109.49
4.4.60.0340.0109.49
4.4.50.0280.0099.49
4.4.40.0300.0159.49
4.4.30.0300.0089.49
4.4.20.0270.0129.49
4.4.10.0350.0109.49
4.4.00.0380.0209.49
4.3.110.0350.0169.49
4.3.100.0380.0159.49
4.3.90.0350.0129.49
4.3.80.0400.0229.49
4.3.70.0320.0129.49
4.3.60.0280.0109.49
4.3.50.0370.0139.49
4.3.40.0280.0159.49
4.3.30.0150.0109.49
4.3.20.0150.0109.49
4.3.10.0170.0079.49
4.3.00.0170.0119.49

preferences:
57.68 ms | 401 KiB | 5 Q