3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime(true); $arr = []; for ($i = 0; $i < 1000; $i++) { array_push($arr, $i); } $end = microtime(true); echo number_format($end - $start, 8, '.', '') . "\n"; unset($arr); $start = microtime(true); $arr = []; for ($i = 0; $i < 1000; $i++) { $arr[] = $i; } $end = microtime(true); echo number_format($end - $start, 8, '.', '') . "\n";
Output for 7.4.1
0.00008702 0.00002503
Output for 7.4.0
0.00006509 0.00002289
Output for 7.3.13
0.00007105 0.00002408
Output for 7.3.12
0.00010109 0.00003004
Output for 7.3.11
0.00009418 0.00002694
Output for 7.3.10
0.00010395 0.00002408
Output for 7.3.9
0.00006986 0.00001788
Output for 7.3.8
0.00008488 0.00001907
Output for 7.3.7
0.00008297 0.00001812
Output for 7.3.6
0.00006700 0.00001788
Output for 7.3.5
0.00006604 0.00001788
Output for 7.3.4
0.00007105 0.00001788
Output for 7.3.3
0.00014210 0.00006008
Output for 7.3.2
0.00004601 0.00001788
Output for 7.3.1
0.00010204 0.00003600
Output for 7.3.0
0.00004601 0.00001812
Output for 7.2.26
0.00012898 0.00003195
Output for 7.2.25
0.00008798 0.00002098
Output for 7.2.24
0.00007796 0.00002098
Output for 7.2.23
0.00007701 0.00002193
Output for 7.2.22
0.00009799 0.00002718
Output for 7.2.21
0.00007391 0.00002003
Output for 7.2.20
0.00008583 0.00003195
Output for 7.2.19
0.00006986 0.00002003
Output for 7.2.18
0.00012493 0.00004005
Output for 7.2.17
0.00012708 0.00003695
Output for 7.2.16
0.00010180 0.00004101
Output for 7.2.15
0.00005221 0.00002098
Output for 7.2.14
0.00006390 0.00003004
Output for 7.2.13
0.00008607 0.00003695
Output for 7.2.12
0.00010896 0.00004816
Output for 7.2.11
0.00005889 0.00002098
Output for 7.2.1, 7.2.10
0.00005603 0.00002289
Output for 7.2.9
0.00005388 0.00002003
Output for 7.2.8
0.00005507 0.00002003
Output for 7.2.7
0.00009704 0.00004196
Output for 7.2.6
0.00008988 0.00003505
Output for 7.2.5
0.00007391 0.00003099
Output for 7.2.4
0.00008607 0.00002885
Output for 7.2.3
0.00008702 0.00003195
Output for 7.2.2
0.00008988 0.00003695
Output for 7.2.0
0.00005603 0.00002098
Output for 7.1.33
0.00015187 0.00005507
Output for 7.1.32
0.00026202 0.00007606
Output for 7.1.31
0.00038218 0.00010800
Output for 7.1.26, 7.1.30
0.00015092 0.00004506
Output for 7.1.29
0.00026298 0.00010586
Output for 7.1.28
0.00024700 0.00007892
Output for 7.1.27
0.00041199 0.00011992
Output for 7.1.25
0.00041389 0.00013709
Output for 7.1.24
0.00026584 0.00007510
Output for 7.1.23
0.00024509 0.00006795
Output for 7.1.22
0.00023890 0.00006890
Output for 7.1.21
0.00022793 0.00008297
Output for 7.1.20
0.00015593 0.00004387
Output for 7.1.19
0.00024700 0.00007010
Output for 7.1.18
0.00036383 0.00008893
Output for 7.1.17
0.00041318 0.00010586
Output for 7.1.16
0.00033092 0.00009489
Output for 7.1.15
0.00025201 0.00006199
Output for 7.1.14
0.00042081 0.00004292
Output for 7.1.13
0.00025511 0.00007319
Output for 7.1.12
0.00034595 0.00008082
Output for 7.1.11
0.00026989 0.00007391
Output for 7.1.10
0.00024199 0.00006700
Output for 7.1.9
0.00032401 0.00009298
Output for 7.1.8
0.00030303 0.00004411
Output for 7.1.7
0.00024009 0.00009489
Output for 7.1.6
0.00031018 0.00009799
Output for 7.1.5
0.00016308 0.00004506
Output for 7.1.4
0.00014901 0.00004292
Output for 7.1.3
0.00014997 0.00004387
Output for 7.1.2
0.00017810 0.00005007
Output for 7.1.1
0.00021195 0.00006485
Output for 7.1.0
0.00031900 0.00008702
Output for 7.0.33
0.00026393 0.00007892
Output for 7.0.32
0.00020289 0.00007200
Output for 7.0.31
0.00015497 0.00004697
Output for 7.0.30
0.00015211 0.00004816
Output for 7.0.29
0.00017881 0.00005078
Output for 7.0.28
0.00015807 0.00004697
Output for 7.0.27
0.00020003 0.00006008
Output for 7.0.26
0.00032687 0.00010014
Output for 7.0.25
0.00021291 0.00006795
Output for 7.0.24
0.00019503 0.00005603
Output for 7.0.23
0.00014806 0.00004482
Output for 7.0.22
0.00015402 0.00004482
Output for 7.0.21
0.00023103 0.00008202
Output for 7.0.20
0.00015187 0.00004506
Output for 7.0.19
0.00022912 0.00006795
Output for 7.0.18
0.00034881 0.00010800
Output for 7.0.17
0.00018406 0.00005293
Output for 7.0.16
0.00022912 0.00006890
Output for 7.0.15
0.00025320 0.00006604
Output for 7.0.14
0.00025797 0.00007987
Output for 7.0.13
0.00034690 0.00009680
Output for 7.0.12
0.00039005 0.00012016
Output for 7.0.11
0.00017095 0.00005102
Output for 7.0.10
0.00032902 0.00009704
Output for 7.0.9
0.00023293 0.00006890
Output for 7.0.8
0.00015306 0.00004601
Output for 7.0.7
0.00015402 0.00004506
Output for 7.0.6
0.00026488 0.00008011
Output for 7.0.5
0.00015306 0.00004387
Output for 7.0.4
0.00032806 0.00009894
Output for 7.0.3
0.00018191 0.00004601
Output for 7.0.2
0.00014901 0.00004387
Output for 7.0.1
0.00023103 0.00006819
Output for 7.0.0
0.00016999 0.00005007
Output for 5.6.40
0.00035405 0.00015402
Output for 5.6.39
0.00059700 0.00024796
Output for 5.6.38
0.00036311 0.00014591
Output for 5.6.37
0.00045204 0.00018597
Output for 5.6.36
0.00038195 0.00014210
Output for 5.6.35
0.00060391 0.00024199
Output for 5.6.34
0.00063515 0.00025606
Output for 5.6.33
0.00072479 0.00013995
Output for 5.6.32
0.00035810 0.00014091
Output for 5.6.31
0.00061917 0.00022316
Output for 5.6.30
0.00039196 0.00015497
Output for 5.6.29
0.00075603 0.00031185
Output for 5.6.28
0.00041318 0.00014687
Output for 5.6.27
0.00045085 0.00017214
Output for 5.6.26
0.00081301 0.00032592
Output for 5.6.25
0.00036001 0.00014210
Output for 5.6.24
0.00057483 0.00022697
Output for 5.6.23
0.00076795 0.00031710
Output for 5.6.22
0.00049210 0.00018406
Output for 5.6.21
0.00048280 0.00018620
Output for 5.6.20
0.00036192 0.00014591
Output for 5.6.19
0.00036502 0.00014210
Output for 5.6.18
0.00057101 0.00020909
Output for 5.6.17
0.00036597 0.00014997
Output for 5.6.16
0.00056195 0.00022888
Output for 5.6.15
0.00036693 0.00014496
Output for 5.6.14
0.00057888 0.00019598
Output for 5.6.13
0.00048900 0.00019884
Output for 5.6.12
0.00038099 0.00014400
Output for 5.6.11
0.00073600 0.00029802
Output for 5.6.10
0.00036192 0.00014615
Output for 5.6.9
0.00039196 0.00016189
Output for 5.6.8
0.00055599 0.00025511
Output for 5.6.7
0.00058317 0.00023103
Output for 5.6.6
0.00055599 0.00023985
Output for 5.6.5
0.00059795 0.00024295
Output for 5.6.4
0.00082207 0.00033617
Output for 5.6.3
0.00046492 0.00019193
Output for 5.6.2
0.00055099 0.00022388
Output for 5.6.1
0.00075483 0.00031495
Output for 5.6.0
0.00035286 0.00013900

preferences:
45.98 ms | 617 KiB | 5 Q