3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'jème lé ponés'; mb_ereg_search_init($string, '(?<=[ ^])\w+'); // Detect words while ($pos = mb_ereg_search_pos()) { $match = mb_ereg_search_getregs()[0]; $matchBasedOnPos = substr($string, $pos[0], $pos[1]); if ($matchBasedOnPos !== $match) { throw new \LogicException("Match based on position '{$matchBasedOnPos}' does not correspond to actual match '{$match}'"); } var_dump(mb_strlen($matchBasedOnPos)); }

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.1.130.0040.00420.14
8.1.120.0000.00717.44
8.1.110.0030.00617.53
8.1.100.0000.00817.55
8.1.90.0020.00517.44
8.1.80.0000.00717.58
8.1.70.0060.00317.59
8.1.60.0000.00717.70
8.1.50.0040.00417.60
8.1.40.0040.00717.64
8.1.30.0040.00417.70
8.1.20.0060.00317.73
8.1.10.0030.00617.67
8.1.00.0080.00017.51
8.0.260.0040.00418.45
8.0.250.0050.00317.07
8.0.240.0040.00417.08
8.0.230.0070.00017.07
8.0.220.0040.00417.01
8.0.210.0030.00317.00
8.0.200.0030.00517.02
8.0.190.0000.00817.11
8.0.180.0000.00716.94
8.0.170.0030.00616.88
8.0.160.0030.00316.99
8.0.150.0000.00716.75
8.0.140.0000.00716.93
8.0.130.0000.00613.46
8.0.120.0040.00416.88
8.0.110.0040.00416.96
8.0.100.0000.00816.82
8.0.90.0040.00416.83
8.0.80.0050.00917.00
8.0.70.0000.00717.14
8.0.60.0000.00717.02
8.0.50.0000.00717.07
8.0.30.0100.01016.96
8.0.20.0100.00717.05
8.0.10.0070.01017.02
8.0.00.0160.00616.99
7.4.330.0000.00616.72
7.4.320.0070.00016.79
7.4.300.0000.00616.79
7.4.290.0000.00716.67
7.4.280.0040.00416.71
7.4.270.0030.00316.69
7.4.260.0030.00313.48
7.4.250.0000.00716.62
7.4.240.0010.00616.74
7.4.230.0070.00016.79
7.4.220.0050.00216.71
7.4.210.0080.00716.67
7.4.200.0040.00416.44
7.4.160.0110.00916.52
7.4.150.0060.01616.70
7.4.140.0120.00916.70
7.4.130.0100.01016.49
7.4.120.0150.00716.60
7.4.110.0060.01116.52
7.4.100.0120.00616.58
7.4.90.0140.00916.70
7.4.80.0070.01016.50
7.4.70.0030.01416.68
7.4.60.0140.00316.40
7.4.50.0100.00616.62
7.4.40.0060.00916.29
7.4.30.0100.02216.60
7.4.20.0080.00816.67
7.4.10.0030.01216.58
7.4.00.0070.01116.36
7.3.330.0020.00516.43
7.3.320.0030.00313.25
7.3.310.0070.00016.50
7.3.300.0030.00316.31
7.3.290.0080.01116.43
7.3.270.0070.01116.37
7.3.260.0060.01616.45
7.3.250.0060.00916.35
7.3.240.0170.00016.39
7.3.230.0070.01016.39
7.3.220.0070.01516.19
7.3.210.0100.00616.11
7.3.200.0100.00716.16
7.3.190.0100.01016.10
7.3.180.0060.01616.24
7.3.170.0120.00616.17
7.3.160.0210.00916.16
7.3.150.0080.00816.12
7.3.140.0090.00916.20
7.3.130.0040.01116.23
7.3.120.0120.00616.21
7.3.110.0080.00816.27
7.3.100.0100.01316.18
7.3.90.0130.00616.52
7.3.80.0150.00416.30
7.3.70.0060.01216.46
7.3.60.0070.01116.45
7.3.50.0100.01016.43
7.3.40.0000.01916.42
7.3.30.0110.01116.43
7.3.20.0070.01316.30
7.3.10.0100.01016.45
7.3.00.0070.01116.36

preferences:
82.99 ms | 406 KiB | 5 Q