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: " . sprintf('%.08f',$end) . PHP_EOL;
Output for 7.1.0
Run: 0.00351501
Output for 7.0.14
Run: 0.00555015
Output for 7.0.10
Run: 0.00526404
Output for 7.0.9
Run: 0.00499392
Output for 7.0.8
Run: 0.00444818
Output for 7.0.7
Run: 0.00459886
Output for 7.0.6
Run: 0.00376701
Output for 7.0.5
Run: 0.00494194
Output for 7.0.4
Run: 0.00512695
Output for 7.0.3
Run: 0.00375581
Output for 7.0.2
Run: 0.00450397
Output for 7.0.1
Run: 0.00411201
Output for 7.0.0
Run: 0.00338197
Output for 5.6.28
Run: 0.01575613
Output for 5.6.25
Run: 0.01241589
Output for 5.6.24
Run: 0.01334119
Output for 5.6.23
Run: 0.01112390
Output for 5.6.22
Run: 0.01435018
Output for 5.6.21
Run: 0.01192403
Output for 5.6.20
Run: 0.01264095
Output for 5.6.19
Run: 0.01309204
Output for 5.6.18
Run: 0.01127791
Output for 5.6.17
Run: 0.01364303
Output for 5.6.16
Run: 0.01047015
Output for 5.6.15
Run: 0.01307106
Output for 5.6.14
Run: 0.01169586
Output for 5.6.13
Run: 0.01279783
Output for 5.6.12
Run: 0.01248288
Output for 5.6.11
Run: 0.01496911
Output for 5.6.10
Run: 0.01089692
Output for 5.6.9
Run: 0.01314998
Output for 5.3.3, 5.6.8
Run: 0.01519608
Output for 5.6.7
Run: 0.01310205
Output for 5.6.6
Run: 0.01296115
Output for 5.6.5
Run: 0.01461601
Output for 5.6.4
Run: 0.01314020
Output for 5.6.3
Run: 0.01425099
Output for 5.6.2
Run: 0.01123881
Output for 5.6.1
Run: 0.01202202
Output for 5.6.0
Run: 0.01403594
Output for 5.5.38
Run: 0.01346803
Output for 5.5.37
Run: 0.01247692
Output for 5.5.36
Run: 0.01068997
Output for 5.5.35
Run: 0.01418114
Output for 5.5.34
Run: 0.01125216
Output for 5.5.33
Run: 0.01096606
Output for 5.5.32
Run: 0.01442909
Output for 5.5.31
Run: 0.01082110
Output for 5.5.30
Run: 0.01013398
Output for 5.5.29
Run: 0.01389289
Output for 5.5.28
Run: 0.01415586
Output for 5.5.27
Run: 0.01458597
Output for 5.5.26
Run: 0.01259804
Output for 5.5.25
Run: 0.01272607
Output for 5.5.24
Run: 0.01354194
Output for 5.5.23
Run: 0.01379108
Output for 5.5.22
Run: 0.01489687
Output for 5.5.21
Run: 0.01455712
Output for 5.5.20
Run: 0.01177096
Output for 5.5.19
Run: 0.01453710
Output for 5.5.18
Run: 0.01256299
Output for 5.5.16
Run: 0.01389480
Output for 5.5.15
Run: 0.01125002
Output for 5.5.14
Run: 0.01110601
Output for 5.5.13
Run: 0.01420784
Output for 5.5.12
Run: 0.01412106
Output for 5.5.11
Run: 0.01148820
Output for 5.5.10
Run: 0.01311684
Output for 5.5.9
Run: 0.01209188
Output for 5.5.8
Run: 0.01243997
Output for 5.5.7
Run: 0.01487207
Output for 5.5.6
Run: 0.00938296
Output for 5.5.5
Run: 0.00913286
Output for 5.5.4
Run: 0.00916004
Output for 5.5.3
Run: 0.00896597
Output for 5.5.2
Run: 0.00902700
Output for 5.5.1
Run: 0.00883007
Output for 5.5.0
Run: 0.00896811
Output for 5.4.45
Run: 0.01225615
Output for 5.4.44
Run: 0.01236820
Output for 5.4.43
Run: 0.01081920
Output for 5.4.42
Run: 0.01489401
Output for 5.4.41
Run: 0.01339507
Output for 5.4.40
Run: 0.01449513
Output for 5.4.39
Run: 0.01996803
Output for 5.4.38
Run: 0.01251602
Output for 5.4.37
Run: 0.01179600
Output for 5.4.36
Run: 0.01269817
Output for 5.4.35
Run: 0.00984597
Output for 5.4.34
Run: 0.01489496
Output for 5.4.32
Run: 0.01124096
Output for 5.4.31
Run: 0.01473999
Output for 5.4.30
Run: 0.01401210
Output for 5.4.29
Run: 0.01485300
Output for 5.4.28
Run: 0.01240587
Output for 5.4.27
Run: 0.01158094
Output for 5.4.26
Run: 0.01469898
Output for 5.4.25
Run: 0.01496005
Output for 5.4.24
Run: 0.01271296
Output for 5.4.23
Run: 0.00910401
Output for 5.4.22
Run: 0.00899386
Output for 5.4.21
Run: 0.01167393
Output for 5.4.20
Run: 0.01062393
Output for 5.4.19
Run: 0.00983906
Output for 5.4.18
Run: 0.00926805
Output for 5.4.17
Run: 0.00827479
Output for 5.4.16
Run: 0.00938392
Output for 5.4.15
Run: 0.00924802
Output for 5.4.14
Run: 0.01066303
Output for 5.4.13
Run: 0.00939894
Output for 5.4.12
Run: 0.01424003
Output for 5.4.11
Run: 0.00908685
Output for 5.4.10
Run: 0.00942683
Output for 5.4.9
Run: 0.00927615
Output for 5.4.8
Run: 0.00938988
Output for 5.4.7
Run: 0.01142812
Output for 5.4.6
Run: 0.01205492
Output for 5.4.5
Run: 0.00903416
Output for 5.4.4
Run: 0.00920296
Output for 5.4.3
Run: 0.00892091
Output for 5.4.2
Run: 0.00919890
Output for 5.4.1
Run: 0.00927997
Output for 5.4.0
Run: 0.00961804
Output for 5.3.29
Run: 0.01513815
Output for 5.3.28
Run: 0.01568604
Output for 5.3.27
Run: 0.01237202
Output for 5.3.26
Run: 0.01117992
Output for 5.3.25
Run: 0.01147294
Output for 5.3.24
Run: 0.01128316
Output for 5.3.23
Run: 0.01213884
Output for 5.3.22
Run: 0.01096106
Output for 5.3.21
Run: 0.01415801
Output for 5.3.20
Run: 0.01144099
Output for 5.3.19
Run: 0.01236391
Output for 5.3.18
Run: 0.01176810
Output for 5.3.17
Run: 0.01279593
Output for 5.3.16
Run: 0.01131892
Output for 5.3.15
Run: 0.01108503
Output for 5.3.14
Run: 0.01105595
Output for 5.3.13
Run: 0.01112914
Output for 5.3.12
Run: 0.01096392
Output for 5.3.11
Run: 0.01106596
Output for 5.3.10
Run: 0.01776505
Output for 5.3.9
Run: 0.01382804
Output for 5.3.8
Run: 0.01124287
Output for 5.3.7
Run: 0.01133609
Output for 5.3.6
Run: 0.01100302
Output for 5.3.5
Run: 0.01140189
Output for 5.3.4
Run: 0.01217413
Output for 5.3.2
Run: 0.01671910
Output for 5.3.1
Run: 0.01466608
Output for 5.3.0
Run: 0.01456904
Output for 5.2.17
Run: 0.02272797
Output for 5.2.16
Run: 0.02098107
Output for 5.2.15
Run: 0.01794887
Output for 5.2.14
Run: 0.02144885
Output for 5.2.13
Run: 0.01644301
Output for 5.2.12
Run: 0.01630402
Output for 5.2.11
Run: 0.01717210
Output for 5.2.10
Run: 0.01628304
Output for 5.2.9
Run: 0.01774788
Output for 5.2.8
Run: 0.01998019
Output for 5.2.7
Run: 0.01858997
Output for 5.2.6
Run: 0.01973486
Output for 5.2.5
Run: 0.01408601
Output for 5.2.4
Run: 0.02226901
Output for 5.2.3
Run: 0.01976109
Output for 5.2.2
Run: 0.01872683
Output for 5.2.1
Run: 0.02034903
Output for 5.2.0
Run: 0.01912379
Output for 5.1.6
Run: 0.01968288
Output for 5.1.5
Run: 0.01053691
Output for 5.1.4
Run: 0.01175690
Output for 5.1.3
Run: 0.01998496
Output for 5.1.2
Run: 0.01901007
Output for 5.1.1
Run: 0.01499104
Output for 5.1.0
Run: 0.01887298
Output for 5.0.5
Run: 0.02314687
Output for 5.0.4
Run: 0.02487397
Output for 5.0.3
Run: 0.02213502
Output for 5.0.2
Run: 0.02823806
Output for 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/Tom6a on line 14 Run: 0.02701592PHP_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/Tom6a 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/Tom6a 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/Tom6a on line 10