3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(ini_set("memory_limit","1")); var_dump(ini_set("memory_limit","1")); $a=str_repeat("A",10*1024*1024);
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6 - 8.3.7
Warning: Failed to set memory limit to 1 bytes (Current memory usage is 2097152 bytes) in /in/mfbKN on line 2 bool(false) Warning: Failed to set memory limit to 1 bytes (Current memory usage is 2097152 bytes) in /in/mfbKN on line 3 bool(false)
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 Warning: Failed to set memory limit to 1 bytes (Current memory usage is 2097152 bytes) in /in/mfbKN on line 2 bool(false) Warning: Failed to set memory limit to 1 bytes (Current memory usage is 2097152 bytes) in /in/mfbKN on line 3 bool(false)
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30
string(3) "64M" string(1) "1" Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 10485792 bytes) in /in/mfbKN on line 4
Process exited with code 255.

preferences:
149.66 ms | 402 KiB | 157 Q