3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{ "nickname": "#FF0000Nick#00FF00name" }'; $data = json_decode($json, true); $garbledData = $data['nickname']; // (?<firstHex>\#[A-F0-9]{6}) match and name the match 'firstHex' - look for a hash, then letters a-f or numbers 0-9, with a length of 6 characters // (?<name>.+) match and name the match 'name' - look for absolutely any characters, any amount // (?<secondHex>\#[A-F0-9]{6}) match and name the match 'secondHex' - look for a hash, then letters a-f or numbers 0-9, with a length of 6 characters $regex = '/(?<firstHex>\#[A-F0-9]{6})(?<name>.+)(?<secondHex>\#[A-F0-9]{6})/'; preg_match($regex, $garbledData, $matches); $firstHex = $matches['firstHex']; $secondHex = $matches['secondHex']; $name = $matches['name']; echo $firstHex . "\n"; echo $secondHex . "\n"; echo $name . "\n";

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.00418.41
8.3.50.0070.01116.53
8.3.40.0070.01119.10
8.3.30.0100.01418.83
8.3.20.0080.00020.73
8.3.10.0040.00421.68
8.3.00.0050.00320.76
8.2.180.0040.01118.66
8.2.170.0070.01122.96
8.2.160.0090.00620.38
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0000.00721.03
8.2.110.0060.00320.53
8.2.100.0080.00419.28
8.2.90.0000.00818.03
8.2.80.0040.00419.16
8.2.70.0060.00317.75
8.2.60.0040.00417.88
8.2.50.0040.00818.05
8.2.40.0060.00318.34
8.2.30.0050.00219.45
8.2.20.0000.00818.06
8.2.10.0000.00719.29
8.2.00.0000.00719.34
8.1.280.0120.00325.92
8.1.270.0120.00622.17
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00323.96
8.1.230.0120.00022.50
8.1.220.0070.00417.78
8.1.210.0080.00018.89
8.1.200.0090.00017.48
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0030.00617.62
8.1.160.0070.00019.00
8.1.150.0000.00718.86
8.1.140.0030.00618.82
8.1.130.0000.00717.46
8.1.120.0110.00017.42
8.1.110.0040.00417.45
8.1.100.0080.00017.59
8.1.90.0000.00717.59
8.1.80.0080.00017.44
8.1.70.0040.00417.43
8.1.60.0000.00817.64
8.1.50.0040.00417.56
8.1.40.0030.00617.60
8.1.30.0000.00717.71
8.1.20.0040.00717.68
8.1.10.0040.00417.61
8.1.00.0000.00817.55
8.0.300.0070.00020.21
8.0.290.0040.00416.75
8.0.280.0030.00518.58
8.0.270.0050.00318.13
8.0.260.0030.00517.02
8.0.250.0030.00317.10
8.0.240.0030.00317.12
8.0.230.0030.00317.02
8.0.220.0000.00616.94
8.0.210.0030.00317.02
8.0.200.0000.00617.05
8.0.190.0080.00017.12
8.0.180.0050.00217.08
8.0.170.0000.00916.95
8.0.160.0030.00916.94
8.0.150.0070.00317.04
8.0.140.0080.00016.91
8.0.130.0050.00013.50
8.0.120.0050.00316.90
8.0.110.0040.00417.03
8.0.100.0040.00417.11
8.0.90.0000.00917.09
8.0.80.0110.00516.99
8.0.70.0040.00417.08
8.0.60.0040.00417.04
8.0.50.0050.00316.86
8.0.30.0100.01317.37
8.0.20.0110.00817.31
8.0.10.0040.00417.12
8.0.00.0090.00917.03
7.4.330.0050.00016.66
7.4.320.0030.00316.61
7.4.300.0000.00616.62
7.4.290.0000.00716.51
7.4.280.0080.00016.77
7.4.270.0050.00316.66
7.4.260.0030.00313.46
7.4.250.0040.00416.67
7.4.240.0070.00016.55
7.4.230.0000.00716.74
7.4.220.0020.00516.79
7.4.210.0080.00916.63
7.4.200.0000.00716.57
7.4.130.0170.00516.61
7.4.120.0040.01416.66
7.4.110.0100.00716.72
7.4.100.0200.00016.64
7.4.90.0070.01016.63
7.4.80.0160.00619.39
7.4.70.0130.00316.73
7.4.60.0060.01016.87
7.4.50.0000.01616.82
7.4.40.0080.00816.62
7.4.20.0100.00916.46
7.4.10.0130.00316.63
7.4.00.0000.01716.71
7.3.330.0030.00316.27
7.3.320.0030.00313.16
7.3.310.0000.01016.42
7.3.300.0040.00316.38
7.3.290.0110.00316.39
7.3.280.0060.00916.36
7.3.260.0110.00616.61
7.3.240.0100.00916.62
7.3.230.0120.01216.51
7.3.210.0180.00016.70
7.3.200.0060.01316.60
7.3.190.0100.00716.63
7.3.180.0090.01216.52
7.3.170.0060.01116.71
7.3.160.0160.00316.76
7.3.140.0130.00516.37
7.3.130.0100.01016.39
7.3.120.0090.01216.60
7.3.110.0070.01016.42
7.3.100.0090.00616.34
7.3.90.0110.00616.38
7.3.80.0120.00916.42
7.3.70.0100.01316.54
7.3.60.0080.00816.47
7.3.50.0120.00916.44
7.3.40.0200.00216.59
7.3.30.0070.01016.54
7.3.20.0110.00816.54
7.3.10.0080.01016.45
7.3.00.0130.00316.61
7.2.330.0130.00616.78
7.2.320.0120.00616.63
7.2.310.0070.01016.72
7.2.300.0120.00616.78
7.2.290.0130.00316.83
7.2.270.0120.00816.63
7.2.260.0170.00316.82
7.2.250.0030.01516.79
7.2.240.0080.01216.83
7.2.230.0040.01516.86
7.2.220.0050.01316.72
7.2.210.0080.01716.91
7.2.200.0120.01216.75
7.2.190.0120.00816.58
7.2.180.0080.01916.53
7.2.170.0100.01016.99
7.2.160.0090.00916.82
7.2.150.0130.00716.72
7.2.140.0030.01816.72
7.2.130.0140.00716.64
7.2.120.0060.02016.88
7.2.110.0150.01516.77
7.2.100.0140.01416.88
7.2.90.0120.01516.60
7.2.80.0160.00816.59
7.2.70.0000.01916.92
7.2.60.0130.00716.82
7.2.50.0140.00616.85
7.2.40.0030.01516.81
7.2.30.0140.00716.94
7.2.20.0100.01016.84
7.2.10.0130.00716.63
7.2.00.0090.00916.66

preferences:
58.53 ms | 400 KiB | 5 Q