3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 0; $x = []; $start = microtime( true ); do { $x[] = array( "firstname" => "Patrick", "lastname" => "Allaert" ); ++$i; } while ( $i < 500000 ); echo microtime( true ) - $start, "\n", memory_get_peak_usage(), "\n";
Output for 7.3.6
0.030179977416992 17169640
Output for 7.3.5
0.028826951980591 17169640
Output for 7.3.4
0.024982929229736 17169640
Output for 7.3.3
0.029248952865601 17169640
Output for 7.3.2
0.051167011260986 17169640
Output for 7.3.1
0.20129704475403 17169640
Output for 7.3.0
0.1671359539032 17169640
Output for 7.2.19
0.027719020843506 17165880
Output for 7.2.18
0.028930902481079 17165880
Output for 7.2.17
0.030690908432007 17165880
Output for 7.2.16
0.02898907661438 17165880
Output for 7.2.15
0.067368984222412 17165880
Output for 7.2.14
0.084129810333252 17165880
Output for 7.2.13
0.096397876739502 17165880
Output for 7.2.12
0.046566009521484 17165880
Output for 7.2.11
0.04855489730835 17165880
Output for 7.2.10
0.063216924667358 17165880
Output for 7.2.9
0.052465915679932 17165880
Output for 7.2.8
0.052028894424438 17165880
Output for 7.2.7
0.022178888320923 17165880
Output for 7.2.6
0.02216100692749 17165880
Output for 7.2.5
0.0190589427948 17165880
Output for 7.2.4
0.026623010635376 17165880
Output for 7.2.3
0.031559944152832 17165880
Output for 7.2.2
0.025624990463257 17165880
Output for 7.2.1
0.028918027877808 17165880
Output for 7.2.0
0.024312973022461 17165880
Output for 7.1.30
0.076917886734009 17129240
Output for 7.1.29
0.076936960220337 17129240
Output for 7.1.28
0.11042404174805 17129240
Output for 7.1.27
0.070810794830322 17129240
Output for 7.1.26
0.11355781555176 17129240
Output for 7.1.25
0.084265947341919 17129240
Output for 7.1.24
0.055212020874023 17129240
Output for 7.1.23
0.065361022949219 17129240
Output for 7.1.22
0.051932096481323 17129240
Output for 7.1.21
0.077715158462524 17129240
Output for 7.1.20
0.09571099281311 17129240
Output for 7.1.19
0.026813983917236 17129240
Output for 7.1.18
0.027685165405273 17129240
Output for 7.1.17
0.030074119567871 17129240
Output for 7.1.16
0.025447130203247 17129240
Output for 7.1.15
0.016860961914062 17129240
Output for 7.1.14
0.025885105133057 17129240
Output for 7.1.13
0.02266788482666 17129240
Output for 7.1.12
0.024690866470337 17129240
Output for 7.1.11
0.02518892288208 17129240
Output for 7.1.10
0.023108005523682 17129240
Output for 7.1.9
0.023704051971436 17129240
Output for 7.1.8
0.023732900619507 17129240
Output for 7.1.7
0.017725944519043 17129240
Output for 7.1.6
0.025575876235962 17129240
Output for 7.1.5
0.023736953735352 17129240
Output for 7.1.4
0.03132700920105 17129240
Output for 7.1.3
0.023320913314819 17129240
Output for 7.1.2
0.027018070220947 17129240
Output for 7.1.1
0.027090072631836 17129240
Output for 7.1.0
0.026176929473877 17129240
Output for 7.0.0 - 7.0.33
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in /in/mXqhZ on line 6
Process exited with code 255.
Output for 5.4.0 - 5.4.9, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 64 bytes) in /in/mXqhZ on line 6
Process exited with code 255.
Output for 5.4.10 - 5.4.45
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/mXqhZ on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/mXqhZ on line 3
Process exited with code 255.

preferences:
193.07 ms | 401 KiB | 253 Q