3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Tester { public function doNothing() { $res = array(); for ( $i = 0; $i < 10000; $i++) { $res[$i] = new StdClass; } } } $t = new Tester(); echo "Before: ".memory_get_usage()."\n"; $t->doNothing(); echo "After: ".memory_get_usage()."\n"; gc_colect_cycles(); echo "After: ".memory_get_usage()."\n";
Output for 7.4.0
Before: 388896 After: 511808 Fatal error: Uncaught Error: Call to undefined function gc_colect_cycles() in /in/JXRHf:15 Stack trace: #0 {main} thrown in /in/JXRHf on line 15
Process exited with code 255.
Output for 7.3.0 - 7.3.12
Before: 388840 After: 511752 Fatal error: Uncaught Error: Call to undefined function gc_colect_cycles() in /in/JXRHf:15 Stack trace: #0 {main} thrown in /in/JXRHf on line 15
Process exited with code 255.
Output for 7.2.17 - 7.2.25
Before: 384984 After: 507896 Fatal error: Uncaught Error: Call to undefined function gc_colect_cycles() in /in/JXRHf:15 Stack trace: #0 {main} thrown in /in/JXRHf on line 15
Process exited with code 255.
Output for 7.2.0
Before: 385024 After: 507936 Fatal error: Uncaught Error: Call to undefined function gc_colect_cycles() in /in/JXRHf:15 Stack trace: #0 {main} thrown in /in/JXRHf on line 15
Process exited with code 255.
Output for 7.1.26 - 7.1.33
Before: 348344 After: 471256 Fatal error: Uncaught Error: Call to undefined function gc_colect_cycles() in /in/JXRHf:15 Stack trace: #0 {main} thrown in /in/JXRHf on line 15
Process exited with code 255.
Output for 7.1.0, 7.1.7
Before: 348416 After: 471328 Fatal error: Uncaught Error: Call to undefined function gc_colect_cycles() in /in/JXRHf:15 Stack trace: #0 {main} thrown in /in/JXRHf on line 15
Process exited with code 255.
Output for 7.1.5 - 7.1.6
Before: 348744 After: 471656 Fatal error: Uncaught Error: Call to undefined function gc_colect_cycles() in /in/JXRHf:15 Stack trace: #0 {main} thrown in /in/JXRHf on line 15
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Before: 348432 After: 471344 Fatal error: Uncaught Error: Call to undefined function gc_colect_cycles() in /in/JXRHf:15 Stack trace: #0 {main} thrown in /in/JXRHf on line 15
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Before: 221544 After: 1204664 Fatal error: Call to undefined function gc_colect_cycles() in /in/JXRHf on line 15
Process exited with code 255.
Output for 5.5.24 - 5.5.35
Before: 221536 After: 1204640 Fatal error: Call to undefined function gc_colect_cycles() in /in/JXRHf on line 15
Process exited with code 255.
Output for 5.4.0 - 5.4.45
Before: 222048 After: 1205152 Fatal error: Call to undefined function gc_colect_cycles() in /in/JXRHf on line 15
Process exited with code 255.
Output for 5.3.11 - 5.3.29
Before: 625360 After: 1608600 Fatal error: Call to undefined function gc_colect_cycles() in /in/JXRHf on line 15
Process exited with code 255.
Output for 5.3.0 - 5.3.10
Before: 625056 After: 1608296 Fatal error: Call to undefined function gc_colect_cycles() in /in/JXRHf on line 15
Process exited with code 255.
Output for 5.2.10 - 5.2.17
Before: 83056 After: 820704 Fatal error: Call to undefined function gc_colect_cycles() in /in/JXRHf on line 15
Process exited with code 255.
Output for 5.2.7 - 5.2.9
Before: 83824 After: 951840 Fatal error: Call to undefined function gc_colect_cycles() in /in/JXRHf on line 15
Process exited with code 255.
Output for 5.2.3 - 5.2.6
Before: 84144 After: 952160 Fatal error: Call to undefined function gc_colect_cycles() in /in/JXRHf on line 15
Process exited with code 255.
Output for 5.2.2
Before: 82072 After: 950040 Fatal error: Call to undefined function gc_colect_cycles() in /in/JXRHf on line 15
Process exited with code 255.
Output for 5.2.1
Before: 82072 After: 851744 Fatal error: Call to undefined function gc_colect_cycles() in /in/JXRHf on line 15
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/JXRHf on line 12
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/JXRHf on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/JXRHf on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/JXRHf on line 3
Process exited with code 255.

preferences:
164.11 ms | 401 KiB | 205 Q