3v4l.org

run code in 300+ PHP versions simultaneously
<?php $range = range(1, 500000); $startTime = microtime(true); array_rand($range,2); echo "Time: " . number_format(( microtime(true) - $startTime), 4) . " Seconds\n";
Output for 7.2.0
Time: 0.0016 Seconds
Output for 4.3.9, 7.1.7
Time: 0.0015 Seconds
Output for 4.3.11, 7.1.5 - 7.1.6
Time: 0.0022 Seconds
Output for 7.1.0
Time: 0.0017 Seconds
Output for 5.0.5, 7.0.20
Time: 0.0053 Seconds
Output for 4.3.10, 7.0.14
Time: 0.0067 Seconds
Output for 4.3.1, 7.0.6
Time: 0.0054 Seconds
Output for 7.0.5
Time: 0.0063 Seconds
Output for 7.0.4
Time: 0.0032 Seconds
Output for 7.0.3
Time: 0.0025 Seconds
Output for 7.0.0, 7.0.2
Time: 0.0038 Seconds
Output for 7.0.1
Time: 0.0009 Seconds
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/dqXt8 on line 2
Process exited with code 255.
Output for 5.2.6 - 5.2.17
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/dqXt8 on line 2
Process exited with code 255.
Output for 5.2.1 - 5.2.5
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 24 bytes) in /in/dqXt8 on line 2
Process exited with code 255.
Output for 5.2.0
Time: 0.0074 Seconds
Output for 5.1.6
Time: 0.0071 Seconds
Output for 5.1.5
Time: 0.0065 Seconds
Output for 4.4.4, 5.1.4
Time: 0.0080 Seconds
Output for 5.1.3
Time: 0.0092 Seconds
Output for 5.1.2
Time: 0.0081 Seconds
Output for 5.0.0, 5.1.1
Time: 0.0057 Seconds
Output for 5.1.0
Time: 0.0115 Seconds
Output for 5.0.4
Time: 0.0055 Seconds
Output for 5.0.3
Time: 0.0060 Seconds
Output for 5.0.2
Time: 0.0107 Seconds
Output for 4.3.2, 4.4.9, 5.0.1
Time: 0.0088 Seconds
Output for 4.4.8
Time: 0.0059 Seconds
Output for 4.4.7
Time: 0.0113 Seconds
Output for 4.3.4, 4.4.6
Time: 0.0039 Seconds
Output for 4.4.5
Time: 0.0020 Seconds
Output for 4.4.3
Time: 0.0097 Seconds
Output for 4.4.2
Time: 0.0100 Seconds
Output for 4.4.1
Time: 0.0049 Seconds
Output for 4.4.0
Time: 0.0064 Seconds
Output for 4.3.8
Time: 0.0006 Seconds
Output for 4.3.7
Time: 0.0066 Seconds
Output for 4.3.6
Time: 0.0103 Seconds
Output for 4.3.5
Time: 0.0061 Seconds
Output for 4.3.3
Time: 0.0037 Seconds
Output for 4.3.0
Time: 0.0160 Seconds

preferences:
155.61 ms | 401 KiB | 175 Q