3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test() { $run = eval('return function(){};'); } echo "0 ", number_format(memory_get_usage())."\n"; for ($i = 0; $i <= 100000; $i++) { test(); if (strlen(rtrim($i, "0")) == 1) { echo str_pad($i,6), " ", number_format(memory_get_usage())."\n"; } }
Output for git.master
0 387,984 1 388,360 2 388,360 3 388,360 4 388,360 5 388,360 6 388,360 7 388,360 8 388,360 9 388,360 10 388,360 20 388,360 30 388,360 40 388,360 50 388,360 60 388,360 70 388,360 80 388,360 90 388,360 100 388,360 200 388,360 300 453,896 400 453,896 500 453,896 600 519,432 700 519,432 800 584,968 900 584,968 1000 584,968 2000 847,112 3000 1,109,256 4000 1,371,400 5000 1,568,008 6000 1,830,152 7000 2,092,296 8000 2,354,440 9000 2,616,584 10000 2,813,192 20000 5,303,560 30000 7,793,928 40000 10,284,296 50000 12,774,664 60000 15,265,032 70000 17,755,400 80000 20,245,768 90000 22,670,600 100000 25,160,968
Output for git.master_jit
0 347,536 1 347,912 2 347,912 3 347,912 4 347,912 5 347,912 6 347,912 7 347,912 8 347,912 9 347,912 10 347,912 20 347,912 30 347,912 40 347,912 50 347,912 60 347,912 70 347,912 80 347,912 90 347,912 100 347,912 200 413,448 300 413,448 400 478,984 500 478,984 600 478,984 700 544,520 800 544,520 900 610,056 1000 610,056 2000 872,200 3000 1,134,344 4000 1,396,488 5000 1,658,632 6000 1,920,776 7000 2,117,384 8000 2,379,528 9000 2,641,672 10000 2,903,816 20000 5,459,720 30000 8,081,160 40000 10,637,064 50000 13,192,968 60000 15,748,872 Fatal error: Out of memory (allocated 18874368 bytes) (tried to allocate 65536 bytes) in /in/UHpPC(4) : eval()'d code on line 1 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
45.32 ms | 401 KiB | 7 Q