3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "příliš žluťoučký img_9 kůn úpěl ďábelské ódy"; var_export(mb_strpos($str, 'img_')); echo "\n"; var_export(preg_match_all('/\G(?!img_\d)\X/u', $str, $m)); echo "\n"; $mbLength = preg_match_all('/\G(?!img_\d)\X/u', $str, $m); var_export(mb_strlen($str) !== $mbLength ? $mbLength : 'not found'); echo "\n"; var_export( preg_match('/\X*?(?=img_\d)/u', $str, $m) ? mb_strlen($m[0]) : 'not found' );

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.4.130.0140.00917.71
8.4.120.0130.00624.00
8.4.110.0140.00618.90
8.4.100.0110.01018.05
8.4.90.0070.00320.34
8.4.80.0120.00719.11
8.4.70.0150.00420.80
8.4.60.0090.00820.68
8.4.50.0080.01120.47
8.4.40.0120.00918.18
8.4.30.0090.00618.79
8.4.20.0090.00621.36
8.4.10.0000.00919.64
8.3.260.0120.00716.51
8.3.250.0070.01116.72
8.3.240.0140.00517.29
8.3.230.0130.00716.89
8.3.220.0040.00418.97
8.3.210.0120.00916.86
8.3.200.0080.01216.67
8.3.190.0070.00919.11
8.3.180.0080.01016.86
8.3.170.0090.00918.79
8.3.160.0080.00017.05
8.3.150.0040.01517.05
8.3.140.0110.00316.88
8.3.130.0000.00818.60
8.3.120.0030.00620.56
8.3.110.0120.00420.94
8.3.100.0060.00324.06
8.3.90.0000.00826.77
8.3.80.0110.00317.97
8.3.70.0250.00717.97
8.3.60.0230.00817.97
8.3.50.0170.00217.97
8.3.40.0180.00917.97
8.3.30.0200.00617.97
8.3.20.0300.00317.97
8.3.10.0350.00617.97
8.3.00.0370.00417.97
8.2.290.0100.00920.29
8.2.280.0090.00618.38
8.2.270.0150.00417.17
8.2.260.0040.00418.33
8.2.250.0060.00319.03
8.2.240.0080.00417.23
8.2.230.0030.00622.58
8.2.220.0040.01237.54
8.2.210.0090.00926.77
8.2.200.0050.00516.75
8.2.190.0340.00917.97
8.2.180.0390.00317.97
8.2.170.0310.00617.97
8.2.160.0370.00417.97
8.2.150.0270.00717.97
8.2.140.0110.01417.97
8.2.130.0220.00017.97
8.2.120.0240.00017.97
8.2.110.0170.00717.97
8.2.100.0190.00417.97
8.2.90.0160.00517.97
8.2.80.0180.00617.97
8.2.70.0150.00917.97
8.2.60.0120.00617.97
8.2.50.0190.00017.97
8.2.40.0160.00317.97
8.2.30.0110.00617.97
8.2.20.0110.00517.97
8.2.10.0160.00317.97
8.2.00.0040.01517.97
8.1.330.0140.00521.77
8.1.320.0120.00818.22
8.1.310.0080.00816.82
8.1.300.0040.00420.13
8.1.290.0090.00630.84
8.1.280.0030.01017.97
8.1.270.0090.00917.97
8.1.260.0230.00017.97
8.1.250.0160.00417.97
8.1.240.0160.00317.97
8.1.230.0160.00317.97
8.1.220.0140.00217.97
8.1.210.0190.00317.97
8.1.200.0070.00717.97
8.1.190.0140.00217.97
8.1.180.0130.00617.97
8.1.170.0120.00617.97
8.1.160.0060.01217.97
8.1.150.0070.01017.97
8.1.140.0150.00417.97
8.1.130.0130.00317.97
8.1.120.0100.00617.97
8.1.110.0160.00317.97
8.1.100.0090.00917.97
8.1.90.0130.00517.97
8.1.80.0090.00917.97
8.1.70.0160.00417.97
8.1.60.0170.00617.97
8.1.50.0080.00817.97
8.1.40.0150.00417.97
8.1.30.0150.00717.97
8.1.20.0160.00717.97
8.1.10.0160.00317.97
8.1.00.0170.00317.97

preferences:
26.86 ms | 403 KiB | 5 Q