3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array('a' => 12, 'b' => 'foo', 'caution' => array('blubb' => array('bar' => 'baz'))); function foo(&$item, $key) { $item = (object)$item; } $start = microtime(true); for ($i = 0; $i < 10000; $i++) { array_walk_recursive($arr, 'foo'); } $end = microtime(true) - $start; echo "Run: " . $end . PHP_EOL;
Output for 7.1.0
Run: 0.0034830570220947
Output for 7.0.14
Run: 0.0055229663848877
Output for 7.0.8
Run: 0.0030198097229004
Output for 7.0.7
Run: 0.0030770301818848
Output for 7.0.6
Run: 0.0030829906463623
Output for 7.0.5
Run: 0.003593921661377
Output for 7.0.4
Run: 0.0030639171600342
Output for 7.0.3
Run: 0.002946138381958
Output for 7.0.2
Run: 0.003943920135498
Output for 7.0.1
Run: 0.0039558410644531
Output for 7.0.0
Run: 0.0030229091644287
Output for 5.6.28
Run: 0.015775203704834
Output for 5.6.23
Run: 0.0088679790496826
Output for 5.6.22
Run: 0.0091769695281982
Output for 5.6.21
Run: 0.0087559223175049
Output for 5.6.20
Run: 0.0088582038879395
Output for 5.6.19
Run: 0.008648157119751
Output for 5.6.18
Run: 0.010705947875977
Output for 5.6.17
Run: 0.0086629390716553
Output for 5.6.16
Run: 0.012675046920776
Output for 5.6.15
Run: 0.011851072311401
Output for 5.6.14
Run: 0.014258146286011
Output for 5.6.13
Run: 0.014270067214966
Output for 5.6.12
Run: 0.014201879501343
Output for 5.6.11
Run: 0.011684894561768
Output for 5.6.10
Run: 0.012290954589844
Output for 5.6.9
Run: 0.0092270374298096
Output for 5.6.8
Run: 0.0094180107116699
Output for 5.6.7
Run: 0.007979154586792
Output for 5.6.6
Run: 0.0077450275421143
Output for 5.6.5
Run: 0.013675212860107
Output for 5.6.4
Run: 0.016137838363647
Output for 5.6.3
Run: 0.0088350772857666
Output for 5.6.2
Run: 0.01136302947998
Output for 5.6.1
Run: 0.009303092956543
Output for 5.6.0
Run: 0.014307975769043
Output for 5.5.37
Run: 0.0088410377502441
Output for 5.5.36
Run: 0.008915901184082
Output for 5.5.35
Run: 0.010707139968872
Output for 5.5.34
Run: 0.0095150470733643
Output for 5.4.37, 5.5.33
Run: 0.009058952331543
Output for 5.5.32
Run: 0.0090341567993164
Output for 5.5.31
Run: 0.0090219974517822
Output for 5.5.30
Run: 0.015038013458252
Output for 5.5.19, 5.5.29
Run: 0.0090179443359375
Output for 5.5.28
Run: 0.013008117675781
Output for 5.5.27
Run: 0.013526916503906
Output for 5.5.26
Run: 0.013734817504883
Output for 5.5.25
Run: 0.0098080635070801
Output for 5.5.24
Run: 0.0085229873657227
Output for 5.5.23
Run: 0.0092298984527588
Output for 5.5.22
Run: 0.012044191360474
Output for 5.5.21
Run: 0.0091540813446045
Output for 5.5.20
Run: 0.022204160690308
Output for 5.5.18
Run: 0.01399302482605
Output for 5.5.16
Run: 0.015135049819946
Output for 5.5.15
Run: 0.021524906158447
Output for 5.5.14
Run: 0.015860080718994
Output for 5.5.13
Run: 0.015359878540039
Output for 5.5.12
Run: 0.010318994522095
Output for 5.5.11
Run: 0.012819051742554
Output for 5.5.10
Run: 0.013030052185059
Output for 5.5.9
Run: 0.016503095626831
Output for 5.5.8
Run: 0.019176959991455
Output for 5.5.7
Run: 0.015635967254639
Output for 5.5.6
Run: 0.012909173965454
Output for 5.5.5
Run: 0.02137303352356
Output for 5.5.4
Run: 0.013592004776001
Output for 5.5.3
Run: 0.015350103378296
Output for 5.5.2
Run: 0.012094974517822
Output for 5.5.1
Run: 0.015247106552124
Output for 5.5.0
Run: 0.011390924453735
Output for 5.4.45
Run: 0.012703895568848
Output for 5.4.44
Run: 0.013391017913818
Output for 5.4.43
Run: 0.015049934387207
Output for 5.4.42
Run: 0.011794090270996
Output for 5.4.41
Run: 0.0089280605316162
Output for 5.4.40
Run: 0.0095691680908203
Output for 5.4.39
Run: 0.0090880393981934
Output for 5.4.38
Run: 0.0092110633850098
Output for 5.4.36
Run: 0.010478973388672
Output for 5.4.35
Run: 0.0090649127960205
Output for 5.4.34
Run: 0.014151096343994
Output for 5.4.32
Run: 0.014734983444214
Output for 5.4.31
Run: 0.010907173156738
Output for 5.4.30
Run: 0.012765884399414
Output for 5.4.29
Run: 0.011418104171753
Output for 5.4.28
Run: 0.011590003967285
Output for 5.4.27
Run: 0.013545036315918
Output for 5.4.26
Run: 0.015136003494263
Output for 5.4.25
Run: 0.01477313041687
Output for 5.4.24
Run: 0.014074087142944
Output for 5.4.23
Run: 0.01454496383667
Output for 5.4.22
Run: 0.010427951812744
Output for 5.4.21
Run: 0.014931917190552
Output for 5.4.20
Run: 0.013401031494141
Output for 5.4.19
Run: 0.0093398094177246
Output for 5.4.18
Run: 0.013317108154297
Output for 5.4.17
Run: 0.014843940734863
Output for 5.4.16
Run: 0.014021873474121
Output for 5.4.15
Run: 0.014439105987549
Output for 5.4.14
Run: 0.012892007827759
Output for 5.4.13
Run: 0.012869119644165
Output for 5.4.12
Run: 0.014761924743652
Output for 5.4.11
Run: 0.015450000762939
Output for 5.4.10
Run: 0.0094048976898193
Output for 5.4.9
Run: 0.013189077377319
Output for 5.4.8
Run: 0.0094940662384033
Output for 5.4.7
Run: 0.014238119125366
Output for 5.4.6
Run: 0.013833045959473
Output for 5.4.5
Run: 0.022801160812378
Output for 5.4.4
Run: 0.0092020034790039
Output for 5.4.3
Run: 0.015343904495239
Output for 5.4.2
Run: 0.014211893081665
Output for 5.4.1
Run: 0.0098199844360352
Output for 5.4.0
Run: 0.01534104347229
Output for 5.3.29
Run: 0.017881155014038
Output for 5.3.28
Run: 0.015949964523315
Output for 5.3.27
Run: 0.013404130935669
Output for 5.3.26
Run: 0.018872022628784
Output for 5.3.25
Run: 0.017310857772827
Output for 5.3.24
Run: 0.016898155212402
Output for 5.3.23
Run: 0.012183904647827
Output for 5.3.22
Run: 0.016106843948364
Output for 5.3.21
Run: 0.01805305480957
Output for 5.3.20
Run: 0.012497901916504
Output for 5.3.19
Run: 0.021399021148682
Output for 5.3.18
Run: 0.015554904937744
Output for 5.3.17
Run: 0.011483907699585
Output for 5.3.16
Run: 0.01665186882019
Output for 5.3.15
Run: 0.017436981201172
Output for 5.3.14
Run: 0.015289068222046
Output for 5.3.13
Run: 0.017198085784912
Output for 5.3.12
Run: 0.017139196395874
Output for 5.3.11
Run: 0.019154071807861
Output for 5.3.10
Run: 0.017815113067627
Output for 5.3.9
Run: 0.018331050872803
Output for 5.3.8
Run: 0.016512870788574
Output for 5.3.7
Run: 0.017613887786865
Output for 5.3.6
Run: 0.017070055007935
Output for 5.3.5
Run: 0.018764972686768
Output for 5.3.4
Run: 0.018775939941406
Output for 5.3.3
Run: 0.016813039779663
Output for 5.3.2
Run: 0.015414953231812
Output for 5.3.1
Run: 0.016983985900879
Output for 5.3.0
Run: 0.019134044647217
Output for 5.2.17
Run: 0.020742177963257
Output for 5.2.16
Run: 0.02190899848938
Output for 5.2.15
Run: 0.021246910095215
Output for 5.2.14
Run: 0.018991947174072
Output for 5.2.13
Run: 0.019245862960815
Output for 5.2.12
Run: 0.015332937240601
Output for 5.2.11
Run: 0.018129110336304
Output for 5.2.10
Run: 0.02072286605835
Output for 5.2.9
Run: 0.018117904663086
Output for 5.2.8
Run: 0.018693923950195
Output for 5.2.7
Run: 0.01778507232666
Output for 5.2.6
Run: 0.02048397064209
Output for 5.2.5
Run: 0.021581888198853
Output for 5.2.4
Run: 0.020514011383057
Output for 5.2.3
Run: 0.021744966506958
Output for 5.2.2
Run: 0.018737077713013
Output for 5.2.1
Run: 0.018928050994873
Output for 5.2.0
Run: 0.018285989761353
Output for 5.1.6
Run: 0.020525932312012
Output for 5.1.5
Run: 0.017990112304688
Output for 5.1.4
Run: 0.016968965530396
Output for 5.1.3
Run: 0.012614011764526
Output for 5.1.2
Run: 0.017129898071289
Output for 5.1.1
Run: 0.016371011734009
Output for 5.1.0
Run: 0.019031047821045
Output for 5.0.5
Run: 0.02792501449585
Output for 5.0.4
Run: 0.027135848999023
Output for 5.0.3
Run: 0.02469801902771
Output for 5.0.2
Run: 0.023913860321045
Output for 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/v1kYb on line 14 Run: 0.026233911514282PHP_EOL
Output for 5.0.0

Process exited with code 139.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: array_walk_recursive() in /in/v1kYb on line 10
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: array_walk_recursive() in /in/v1kYb on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: array_walk_recursive() in /in/v1kYb on line 10