3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "NPWP:016386112436000 JALAN ELANG DESA SUKAHATI CITEUREUP BOGOR 16810, INDONESIA TEL:+62(21)8765105", "NPWP 314633389431000 DELTA SILICON INDUSTRIALL PARK 3 JL PINANG F 16/25A, CICAU CIKARANG PUSAT, CITY: BEKASI, JB 17550 INDONESIA" ]; foreach ($strings as $string) { if(preg_match('/^NPWP:?\s*\K\d+/', $string, $matches)) { echo ($matches[0]) . PHP_EOL; } }
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6 - 8.3.7
016386112436000 314633389431000
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 016386112436000 314633389431000

preferences:
207.1 ms | 402 KiB | 301 Q