3v4l.org

run code in 300+ PHP versions simultaneously
<?php $output = "a b\n\nc"; var_dump(preg_split('/\s/', $output, NULL, PREG_SPLIT_NO_EMPTY));
Output for 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.14, 8.4.16 - 8.4.18, 8.5.0 - 8.5.3
Deprecated: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in /in/cVPim on line 4 array(3) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" }
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.
Output for 7.3.33
array(3) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" }

preferences:
67.39 ms | 853 KiB | 4 Q