3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $t = microtime(true); function passgen($l = 12) { $r = ""; $s = "1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM"; $slen = mb_strlen($s) - 1; for ($i = 0; $i < $l; $i++) { $r .= $s[mt_rand(0, $slen)]; } return $r; } for ($i = 0; $i < 100000; ++$i) passgen(); printf("%0.04f\n", microtime(true) - $t);
Output for 7.1.0
0.1826
Output for 7.0.14
0.1839
Output for 7.0.10
0.1663
Output for 7.0.9
0.1270
Output for 7.0.8
0.1525
Output for 7.0.7
0.1737
Output for 7.0.6
0.1778
Output for 7.0.5
0.1578
Output for 7.0.4
0.1602
Output for 7.0.3
0.1605
Output for 7.0.2
0.1591
Output for 7.0.1
0.1550
Output for 7.0.0
0.1787
Output for 5.6.28
0.2894
Output for 5.4.40, 5.6.25
0.2454
Output for 5.6.24
0.2449
Output for 5.6.23
0.2440
Output for 5.6.22
0.2863
Output for 5.6.21
0.2522
Output for 5.6.20
0.2592
Output for 5.6.19
0.2790
Output for 5.6.18
0.2557
Output for 5.6.17
0.2627
Output for 5.6.16
0.2669
Output for 5.6.15
0.2587
Output for 5.3.9, 5.6.14
0.2689
Output for 5.6.13
0.2610
Output for 5.6.12
0.2691
Output for 5.5.9, 5.6.11
0.2523
Output for 5.6.10
0.2506
Output for 5.6.9
0.2807
Output for 5.6.8
0.2589
Output for 5.5.7, 5.6.7
0.2494
Output for 5.4.14, 5.6.6
0.2567
Output for 5.6.5
0.2652
Output for 5.6.4
0.2757
Output for 5.6.3
0.2548
Output for 5.6.2
0.2582
Output for 5.5.12, 5.6.1
0.2526
Output for 5.6.0
0.2572
Output for 5.5.38
0.2366
Output for 5.5.37
0.2095
Output for 5.5.36
0.2670
Output for 5.5.35
0.2651
Output for 5.5.34
0.2640
Output for 5.5.33
0.2511
Output for 5.5.32
0.2518
Output for 5.3.7, 5.5.31
0.2701
Output for 5.5.4, 5.5.30
0.2443
Output for 5.5.29
0.2840
Output for 5.5.28
0.2388
Output for 5.5.27
0.2507
Output for 5.5.26
0.2596
Output for 5.5.25
0.2306
Output for 5.5.24
0.2740
Output for 5.5.23
0.2484
Output for 5.5.22
0.2473
Output for 5.5.21
0.2424
Output for 5.5.20
0.2489
Output for 5.5.19
0.2608
Output for 5.5.18
0.2438
Output for 5.5.16
0.2615
Output for 5.5.15
0.2768
Output for 5.5.14
0.2758
Output for 5.5.13
0.2550
Output for 5.5.11
0.2380
Output for 5.4.38, 5.5.10
0.2528
Output for 5.5.8
0.2500
Output for 5.5.6
0.2471
Output for 5.5.5
0.2374
Output for 5.4.29, 5.5.3
0.2432
Output for 5.5.2
0.2404
Output for 5.5.1
0.2527
Output for 5.5.0
0.2482
Output for 5.4.45
0.2318
Output for 5.4.44
0.2402
Output for 5.4.43
0.2986
Output for 5.4.42
0.2683
Output for 5.4.41
0.2347
Output for 5.4.39
0.2324
Output for 5.4.37
0.2369
Output for 5.4.36
0.2343
Output for 5.4.5, 5.4.35
0.2389
Output for 5.4.34
0.2441
Output for 5.4.32
0.2394
Output for 5.4.6, 5.4.31
0.2490
Output for 5.4.30
0.2417
Output for 5.4.28
0.2538
Output for 5.4.27
0.2472
Output for 5.4.26
0.2378
Output for 5.4.25
0.2565
Output for 5.4.24
0.2531
Output for 5.4.23
0.2413
Output for 5.4.22
0.2435
Output for 5.4.21
0.2600
Output for 5.4.20
0.2437
Output for 5.4.19
0.2525
Output for 5.4.18
0.2558
Output for 5.4.17
0.2403
Output for 5.4.16
0.2337
Output for 5.4.15
0.2495
Output for 5.4.13
0.2658
Output for 5.4.12
0.2618
Output for 5.4.11
0.2603
Output for 5.4.10
0.2288
Output for 5.4.9
0.2367
Output for 5.4.8
0.2326
Output for 5.4.7
0.2642
Output for 5.4.4
0.2268
Output for 5.4.3
0.2446
Output for 5.4.1 - 5.4.2
0.2515
Output for 5.4.0
0.2464
Output for 5.3.29
0.2849
Output for 5.3.28
0.2829
Output for 5.3.27
0.2806
Output for 5.3.26
0.2718
Output for 5.3.25
0.2866
Output for 5.3.19, 5.3.24
0.2822
Output for 5.3.17, 5.3.23
0.2970
Output for 5.3.22
0.2917
Output for 5.3.21
0.3083
Output for 5.3.20
0.2856
Output for 5.3.18
0.3599
Output for 5.3.16
0.2748
Output for 5.3.15
0.3067
Output for 5.3.14
0.2803
Output for 5.3.13
0.2391
Output for 5.3.12
0.2236
Output for 5.3.11
0.2713
Output for 5.3.10
0.2834
Output for 5.3.8
0.2766
Output for 5.3.6
0.2729
Output for 5.3.5
0.2239
Output for 5.3.4
0.2708
Output for 5.3.3
0.2764
Output for 5.3.2
0.3041
Output for 5.3.1
0.2882
Output for 5.3.0
0.3044
Output for 5.2.17
0.2595
Output for 5.2.16
0.3133
Output for 5.2.15
0.3423
Output for 5.2.14
0.3393
Output for 5.2.13
0.3581
Output for 5.2.12
0.3631
Output for 5.2.11
0.3690
Output for 5.2.10
0.3546
Output for 5.2.9
0.3592
Output for 5.2.8
0.3648
Output for 5.2.7
0.3557
Output for 5.2.6
0.3563
Output for 5.2.5
0.3444
Output for 5.2.4
0.3603
Output for 5.2.3
0.3670
Output for 5.2.2
0.3267
Output for 5.2.1
0.3295
Output for 5.2.0
0.3504
Output for 5.1.6
0.3643
Output for 5.1.5
0.3779
Output for 5.1.4
0.3570
Output for 5.1.3
0.3428
Output for 5.1.2
0.4501
Output for 5.1.1
0.3733
Output for 5.1.0
0.3486
Output for 5.0.5
0.5983
Output for 5.0.4
0.5920
Output for 5.0.3
0.5447
Output for 5.0.2
0.7227
Output for 5.0.1
0.5668
Output for 5.0.0
0.5629
Output for 4.4.9
0.5786
Output for 4.4.8
0.5492
Output for 4.4.7
0.5797
Output for 4.4.6
0.5666
Output for 4.4.5
0.5610
Output for 4.4.4
0.7003
Output for 4.4.3
0.6345
Output for 4.4.2
0.5733
Output for 4.4.1
0.5642
Output for 4.4.0
0.5609
Output for 4.3.11
0.5520
Output for 4.3.10
0.5418
Output for 4.3.9
0.5735
Output for 4.3.8
0.5726
Output for 4.3.7
0.5763
Output for 4.3.6
0.5714
Output for 4.3.5
0.5594
Output for 4.3.4
0.5515
Output for 4.3.3
0.5579
Output for 4.3.2
0.0750
Output for 4.3.1
0.1442
Output for 4.3.0
0.1275