3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '一行*'; preg_match('/^([^\*]+)\*+/', $str, $m); var_dump($m[1]);
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 5.6.34 - 5.6.38, 5.6.40, 7.0.0 - 7.0.3, 7.0.5 - 7.0.11, 7.0.13, 7.0.16 - 7.0.18, 7.0.20 - 7.0.27, 7.0.29 - 7.0.30, 7.0.32 - 7.0.33, 7.1.3, 7.1.5 - 7.1.6, 7.1.8 - 7.1.17, 7.1.19 - 7.1.20, 7.1.22 - 7.1.23, 7.1.26 - 7.1.33, 7.2.0, 7.2.9 - 7.2.25, 7.3.0, 7.3.2 - 7.3.12, 7.4.0, 8.2.15 - 8.2.17, 8.3.2 - 8.3.4
string(6) "一行"
Output for 5.6.29 - 5.6.33, 5.6.39, 7.0.4, 7.0.12, 7.0.14 - 7.0.15, 7.0.19, 7.0.28, 7.0.31, 7.1.0 - 7.1.2, 7.1.4, 7.1.7, 7.1.18, 7.1.21, 7.1.24 - 7.1.25, 7.2.1 - 7.2.8, 7.3.1

Process exited with code 137.

preferences:
211.53 ms | 404 KiB | 328 Q