3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = 'aaaaaaaaaa.bbbbbbbbbbb.cccccccccccc.dddddddddd.eeeeeeeeee.fffffffff.gggggggggg.hhhhhhhhh'; $max = 10; $retry = 1; do { echo $test . "\n"; // preg_match("/^.+?\.(.+)$/", $test, $result); // if (0 === preg_match("/^.+?\.(.+)$/", $test, $matches)) throw new \InvalidArgumentException('invalid'); if (0 === preg_match("/^[^.]+\.(.+)$/", $test, $matches)) throw new \InvalidArgumentException('invalid'); $test = $matches[1]; } while ($retry++ < $max);

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.70.0090.00618.68
8.3.60.0070.00718.81
8.3.50.0120.00716.60
8.3.40.0090.00618.97
8.3.30.0150.00018.96
8.3.20.0060.00320.78
8.3.10.0000.00721.90
8.3.00.0040.00419.60
8.2.180.0140.00716.75
8.2.170.0110.00422.96
8.2.160.0100.00720.34
8.2.150.0000.00725.66
8.2.140.0000.00824.66
8.2.130.0000.00820.35
8.2.120.0000.00826.35
8.2.110.0110.00022.18
8.2.100.0120.00018.16
8.2.90.0030.00519.05
8.2.80.0000.00817.97
8.2.70.0080.00017.88
8.2.60.0040.00418.05
8.2.50.0090.00018.10
8.2.40.0000.00822.46
8.2.30.0080.00021.00
8.2.20.0040.00418.21
8.2.10.0090.00018.15
8.2.00.0040.00418.07
8.1.280.0070.01425.92
8.1.270.0070.00023.91
8.1.260.0000.00726.35
8.1.250.0030.00528.09
8.1.240.0060.00323.98
8.1.230.0000.01119.29
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0070.00317.60
8.1.190.0060.00317.48
8.1.180.0000.00718.10
8.1.170.0040.00418.79
8.1.160.0000.00719.04
8.1.150.0040.00420.74
8.1.140.0030.00619.52
8.1.130.0030.00318.92
8.1.120.0060.00317.62
8.1.110.0030.00517.50
8.1.100.0040.00317.61
8.1.90.0040.00417.51
8.1.80.0040.00417.53
8.1.70.0060.00317.62
8.1.60.0030.00517.60
8.1.50.0040.00417.68
8.1.40.0070.00417.57
8.1.30.0030.00517.75
8.1.20.0040.00417.70
8.1.10.0040.00717.69
8.1.00.0040.00417.65
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0070.00018.38
8.0.270.0000.00717.29
8.0.260.0070.00017.02
8.0.250.0070.00017.16
8.0.240.0000.00917.08
8.0.230.0000.00717.19
8.0.220.0030.00317.12
8.0.210.0070.00017.09
8.0.200.0030.00317.21
8.0.190.0000.00817.08
8.0.180.0040.00417.10
8.0.170.0040.00416.98
8.0.160.0070.00017.10
8.0.150.0070.00017.04
8.0.140.0000.00717.10
8.0.130.0000.00813.57
8.0.120.0040.00417.13
8.0.110.0070.00017.05
8.0.100.0040.00416.94
8.0.90.0000.00717.02
8.0.80.0120.00417.04
8.0.70.0000.00817.15
8.0.60.0040.00417.05
8.0.50.0040.00416.95
8.0.30.0120.00817.30
8.0.20.0140.00817.45
8.0.10.0080.00017.22
8.0.00.0070.01117.04
7.4.330.0050.00015.55
7.4.320.0000.00616.60
7.4.300.0070.00016.66
7.4.290.0060.00316.82
7.4.280.0040.00416.80
7.4.270.0030.00316.71
7.4.260.0070.00316.82
7.4.250.0040.00416.70
7.4.240.0000.00716.83
7.4.230.0000.00716.75
7.4.220.0140.00316.74
7.4.210.0100.01016.73
7.4.200.0000.00716.76
7.4.160.0100.00716.75
7.4.150.0090.00917.40
7.4.140.0110.01017.86
7.4.130.0060.01316.80
7.4.120.0130.00716.71
7.4.110.0140.00716.89
7.4.100.0160.00616.81
7.4.90.0080.00916.71
7.4.80.0040.01319.39
7.4.70.0140.01016.74
7.4.60.0070.01016.79
7.4.50.0060.00916.56
7.4.40.0130.00316.55
7.4.30.0120.00616.82
7.3.330.0000.00713.34
7.3.320.0000.00513.42
7.3.310.0000.00716.62
7.3.300.0030.00316.51
7.3.290.0040.01316.51
7.3.280.0070.00816.50
7.3.270.0070.01417.40
7.3.260.0120.00516.54
7.3.250.0080.01016.66
7.3.240.0040.01416.66
7.3.230.0120.00916.79
7.3.210.0040.01216.72
7.3.200.0070.01016.91
7.3.190.0110.00716.65
7.3.180.0080.00816.68
7.3.170.0140.00316.78
7.3.160.0080.00816.68
7.2.330.0130.01016.84
7.2.320.0110.00616.84
7.2.310.0140.00416.86
7.2.300.0100.00616.88
7.2.290.0070.01016.83

preferences:
43.6 ms | 401 KiB | 5 Q