3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = "12345"; $time_start = microtime(true); echo $var[0] . "-" . substr($var,1) . "\n"; $time_end = microtime(true); echo "\nExecution Time: " . $time_end - $time_start . "\n"; $time_start2 = microtime(true); echo str_replace($var[0], $var[0].'-', $var) . "\n"; $time_end2 = microtime(true); echo "\nExecution Time: " . $time_end2 - $time_start2; $time_start3 = microtime(true); echo substr_replace($var, '-', 1, 0); $time_end3 = microtime(true); echo "\nExecution Time: " . $time_end3 - $time_start3;
Output for 7.1.0
1-2345 Warning: A non-numeric value encountered in /in/Us4BE on line 7 -1364229158.0062 1-2345 Warning: A non-numeric value encountered in /in/Us4BE on line 12 -1364229158.00621-2345 Warning: A non-numeric value encountered in /in/Us4BE on line 17 -1364229158.0062
Output for 7.0.14
1-2345 -1364229158.0038 1-2345 -1364229158.00391-2345-1364229158.0039
Output for 7.0.6
1-2345 -1462262432.3748 1-2345 -1462262432.37481-2345-1462262432.3748
Output for 7.0.5
1-2345 -1459630218.373 1-2345 -1459630218.3731-2345-1459630218.373
Output for 7.0.4
1-2345 -1457598280.4633 1-2345 -1457598280.46331-2345-1457598280.4633
Output for 7.0.3
1-2345 -1458291773.6656 1-2345 -1458291773.66561-2345-1458291773.6656
Output for 7.0.2
1-2345 -1458658572.5126 1-2345 -1458658572.51261-2345-1458658572.5126
Output for 7.0.1
1-2345 -1458761974.4364 1-2345 -1458761974.43641-2345-1458761974.4364
Output for 7.0.0
1-2345 -1459026733.6959 1-2345 -1459026733.69591-2345-1459026733.6959
Output for 5.6.28
1-2345 -1364229158.0044 1-2345 -1364229158.00441-2345-1364229158.0044
Output for 5.6.21
1-2345 -1462159294.5653 1-2345 -1462159294.56541-2345-1462159294.5654
Output for 5.6.20
1-2345 -1460231259.6282 1-2345 -1460231259.62821-2345-1460231259.6282
Output for 5.6.19
1-2345 -1457368346.2953 1-2345 -1457368346.29531-2345-1457368346.2953
Output for 5.6.18
1-2345 -1458001988.7199 1-2345 -1458001988.71991-2345-1458001988.7199
Output for 5.6.17
1-2345 -1458393451.4538 1-2345 -1458393451.45391-2345-1458393451.4539
Output for 5.6.16
1-2345 -1459115858.9634 1-2345 -1459115858.96351-2345-1459115858.9635
Output for 5.6.15
1-2345 -1459206237.9379 1-2345 -1459206237.93791-2345-1459206237.9379
Output for 5.6.14
1-2345 -1459560219.6448 1-2345 -1459560219.64481-2345-1459560219.6448
Output for 5.6.13
1-2345 -1460697468.772 1-2345 -1460697468.7721-2345-1460697468.772
Output for 5.6.12
1-2345 -1461092651.1171 1-2345 -1461092651.11711-2345-1461092651.1172
Output for 5.6.11
1-2345 -1461377245.942 1-2345 -1461377245.9421-2345-1461377245.942
Output for 5.6.10
1-2345 -1461556275.4953 1-2345 -1461556275.49541-2345-1461556275.4954
Output for 5.6.9
1-2345 -1461746947.5242 1-2345 -1461746947.52421-2345-1461746947.5242
Output for 5.6.8
1-2345 -1461948966.0456 1-2345 -1461948966.04561-2345-1461948966.0456
Output for 5.5.35
1-2345 -1463900947.0706 1-2345 -1463900947.07061-2345-1463900947.0706
Output for 5.5.34
1-2345 -1460326116.8505 1-2345 -1460326116.85051-2345-1460326116.8505
Output for 5.5.33
1-2345 -1457465364.077 1-2345 -1457465364.0771-2345-1457465364.077
Output for 5.5.32
1-2345 -1458180659.6815 1-2345 -1458180659.68151-2345-1458180659.6815
Output for 5.5.31
1-2345 -1458489795.1946 1-2345 -1458489795.19461-2345-1458489795.1946
Output for 5.5.30
1-2345 -1459472334.0196 1-2345 -1459472334.01961-2345-1459472334.0196
Output for 5.5.29
1-2345 -1460834627.2915 1-2345 -1460834627.29161-2345-1460834627.2916
Output for 5.5.28
1-2345 -1461190227.594 1-2345 -1461190227.5941-2345-1461190227.594
Output for 5.5.27
1-2345 -1461285481.056 1-2345 -1461285481.0561-2345-1461285481.056
Output for 5.5.26
1-2345 -1461651480.6216 1-2345 -1461651480.62161-2345-1461651480.6216
Output for 5.5.25
1-2345 -1461846972.4567 1-2345 -1461846972.45671-2345-1461846972.4567
Output for 5.5.24
1-2345 -1464033441.6123 1-2345 -1464033441.61231-2345-1464033441.6123
Output for 5.4.45
1-2345 -1445055470.2897 1-2345 -1445055470.28971-2345-1445055470.2897
Output for 5.4.44
1-2345 -1445055470.5805 1-2345 -1445055470.58061-2345-1445055470.5806
Output for 5.4.43
1-2345 -1445055470.8641 1-2345 -1445055470.86411-2345-1445055470.8641
Output for 5.4.42
1-2345 -1445055471.175 1-2345 -1445055471.1751-2345-1445055471.175
Output for 5.4.41
1-2345 -1445055471.4674 1-2345 -1445055471.46741-2345-1445055471.4674
Output for 5.4.40
1-2345 -1445055471.7961 1-2345 -1445055471.79621-2345-1445055471.7962
Output for 5.4.39
1-2345 -1445055472.124 1-2345 -1445055472.1241-2345-1445055472.1241
Output for 5.4.38
1-2345 -1445055472.3161 1-2345 -1445055472.31621-2345-1445055472.3162
Output for 5.4.37
1-2345 -1445055472.4181 1-2345 -1445055472.41811-2345-1445055472.4181
Output for 5.4.36
1-2345 -1445055472.5594 1-2345 -1445055472.55941-2345-1445055472.5594
Output for 5.4.35
1-2345 -1445055472.847 1-2345 -1445055472.8471-2345-1445055472.847
Output for 5.4.34
1-2345 -1445055473.1333 1-2345 -1445055473.13331-2345-1445055473.1333
Output for 5.4.32
1-2345 -1445055473.4082 1-2345 -1445055473.40821-2345-1445055473.4082
Output for 5.4.31
1-2345 -1445055473.7031 1-2345 -1445055473.70311-2345-1445055473.7031
Output for 5.4.30
1-2345 -1445055474.0723 1-2345 -1445055474.07231-2345-1445055474.0723
Output for 5.4.29
1-2345 -1445055474.3647 1-2345 -1445055474.36471-2345-1445055474.3647
Output for 5.4.28
1-2345 -1445055474.6497 1-2345 -1445055474.64971-2345-1445055474.6498
Output for 5.4.27
1-2345 -1445055474.9306 1-2345 -1445055474.93061-2345-1445055474.9306
Output for 5.4.26
1-2345 -1445055475.2305 1-2345 -1445055475.23051-2345-1445055475.2305
Output for 5.4.25
1-2345 -1445055475.5301 1-2345 -1445055475.53021-2345-1445055475.5302
Output for 5.4.24
1-2345 -1445055475.8107 1-2345 -1445055475.81071-2345-1445055475.8107
Output for 5.4.23
1-2345 -1445055476.0826 1-2345 -1445055476.08271-2345-1445055476.0827
Output for 5.4.22
1-2345 -1445055476.381 1-2345 -1445055476.3811-2345-1445055476.381
Output for 5.4.21
1-2345 -1445055476.6806 1-2345 -1445055476.68061-2345-1445055476.6806
Output for 5.4.20
1-2345 -1445055476.9649 1-2345 -1445055476.96491-2345-1445055476.9649
Output for 5.4.19
1-2345 -1445055477.2444 1-2345 -1445055477.24441-2345-1445055477.2444
Output for 5.4.18
1-2345 -1445055477.5392 1-2345 -1445055477.53921-2345-1445055477.5392
Output for 5.4.17
1-2345 -1445055477.821 1-2345 -1445055477.8211-2345-1445055477.821
Output for 5.4.16
1-2345 -1445055478.1121 1-2345 -1445055478.11211-2345-1445055478.1121
Output for 5.4.15
1-2345 -1445055478.3878 1-2345 -1445055478.38781-2345-1445055478.3878
Output for 5.4.14
1-2345 -1445055478.6707 1-2345 -1445055478.67071-2345-1445055478.6707
Output for 5.4.13
1-2345 -1445055478.9537 1-2345 -1445055478.95371-2345-1445055478.9537
Output for 5.4.12
1-2345 -1445055479.2557 1-2345 -1445055479.25571-2345-1445055479.2557
Output for 5.4.11
1-2345 -1445055479.5719 1-2345 -1445055479.57191-2345-1445055479.5719
Output for 5.4.10
1-2345 -1445055479.8673 1-2345 -1445055479.86731-2345-1445055479.8673
Output for 5.4.9
1-2345 -1445055480.213 1-2345 -1445055480.21311-2345-1445055480.2131
Output for 5.4.8
1-2345 -1445055480.5194 1-2345 -1445055480.51941-2345-1445055480.5194
Output for 5.4.7
1-2345 -1445055480.8485 1-2345 -1445055480.84861-2345-1445055480.8486
Output for 5.4.6
1-2345 -1445055481.1516 1-2345 -1445055481.15161-2345-1445055481.1516
Output for 5.4.5
1-2345 -1445055481.456 1-2345 -1445055481.45611-2345-1445055481.4561
Output for 5.4.4
1-2345 -1445055481.7824 1-2345 -1445055481.78241-2345-1445055481.7824
Output for 5.4.3
1-2345 -1445055482.0711 1-2345 -1445055482.07121-2345-1445055482.0712
Output for 5.4.2
1-2345 -1445055482.3384 1-2345 -1445055482.33841-2345-1445055482.3384
Output for 5.4.1
1-2345 -1445055482.5944 1-2345 -1445055482.59441-2345-1445055482.5944
Output for 5.4.0
1-2345 -1445055482.8691 1-2345 -1445055482.86911-2345-1445055482.8692
Output for 5.3.29
1-2345 -1445055483.2211 1-2345 -1445055483.22111-2345-1445055483.2211
Output for 5.3.28
1-2345 -1445055483.4819 1-2345 -1445055483.48191-2345-1445055483.4819
Output for 5.3.27
1-2345 -1445055483.7458 1-2345 -1445055483.74581-2345-1445055483.7458
Output for 5.3.26
1-2345 -1445055484.0215 1-2345 -1445055484.02161-2345-1445055484.0216
Output for 5.3.25
1-2345 -1445055484.2822 1-2345 -1445055484.28221-2345-1445055484.2822
Output for 5.3.24
1-2345 -1445055484.5697 1-2345 -1445055484.56981-2345-1445055484.5698
Output for 5.3.23
1-2345 -1445055484.8453 1-2345 -1445055484.84541-2345-1445055484.8454
Output for 5.3.22
1-2345 -1445055485.1212 1-2345 -1445055485.12121-2345-1445055485.1212
Output for 5.3.21
1-2345 -1445055485.3822 1-2345 -1445055485.38221-2345-1445055485.3822
Output for 5.3.20
1-2345 -1445055485.6506 1-2345 -1445055485.65071-2345-1445055485.6507
Output for 5.3.19
1-2345 -1445055485.9309 1-2345 -1445055485.9311-2345-1445055485.931
Output for 5.3.18
1-2345 -1445055486.1793 1-2345 -1445055486.17941-2345-1445055486.1794
Output for 5.3.17
1-2345 -1445055486.4517 1-2345 -1445055486.45171-2345-1445055486.4518
Output for 5.3.16
1-2345 -1445055486.7122 1-2345 -1445055486.71221-2345-1445055486.7122
Output for 5.3.15
1-2345 -1445055486.9863 1-2345 -1445055486.98631-2345-1445055486.9863
Output for 5.3.14
1-2345 -1445055487.2568 1-2345 -1445055487.25681-2345-1445055487.2568
Output for 5.3.13
1-2345 -1445055487.5374 1-2345 -1445055487.53741-2345-1445055487.5374
Output for 5.3.12
1-2345 -1445055487.7967 1-2345 -1445055487.79671-2345-1445055487.7967
Output for 5.3.11
1-2345 -1445055488.0756 1-2345 -1445055488.07561-2345-1445055488.0756
Output for 5.3.10
1-2345 -1445055488.3549 1-2345 -1445055488.35491-2345-1445055488.3549
Output for 5.3.9
1-2345 -1445055488.6309 1-2345 -1445055488.63091-2345-1445055488.6309
Output for 5.3.8
1-2345 -1445055488.9413 1-2345 -1445055488.94141-2345-1445055488.9414
Output for 5.3.7
1-2345 -1445055489.266 1-2345 -1445055489.2661-2345-1445055489.266
Output for 5.3.6
1-2345 -1445055489.5734 1-2345 -1445055489.57341-2345-1445055489.5734
Output for 5.3.5
1-2345 -1445055489.885 1-2345 -1445055489.8851-2345-1445055489.885
Output for 5.3.4
1-2345 -1445055490.1704 1-2345 -1445055490.17041-2345-1445055490.1704
Output for 5.3.3
1-2345 -1445055490.5475 1-2345 -1445055490.54761-2345-1445055490.5476
Output for 5.3.2
1-2345 -1445055490.8399 1-2345 -1445055490.841-2345-1445055490.84
Output for 5.3.1
1-2345 -1445055491.1133 1-2345 -1445055491.11331-2345-1445055491.1133
Output for 5.3.0
1-2345 -1445055491.4088 1-2345 -1445055491.40881-2345-1445055491.4088
Output for 5.2.17
1-2345 -1445055491.6754 1-2345 -1445055491.67541-2345-1445055491.6754
Output for 5.2.16
1-2345 -1445055491.9293 1-2345 -1445055491.92931-2345-1445055491.9293
Output for 5.2.15
1-2345 -1445055492.1738 1-2345 -1445055492.17381-2345-1445055492.1738
Output for 5.2.14
1-2345 -1445055492.4414 1-2345 -1445055492.44141-2345-1445055492.4414
Output for 5.2.13
1-2345 -1445055492.7019 1-2345 -1445055492.70191-2345-1445055492.7019
Output for 5.2.12
1-2345 -1445055493.0518 1-2345 -1445055493.05191-2345-1445055493.0519
Output for 5.2.11
1-2345 -1445055493.3271 1-2345 -1445055493.32721-2345-1445055493.3272
Output for 5.2.10
1-2345 -1445055493.7052 1-2345 -1445055493.70521-2345-1445055493.7052
Output for 5.2.9
1-2345 -1445055493.9649 1-2345 -1445055493.9651-2345-1445055493.965
Output for 5.2.8
1-2345 -1445055494.2076 1-2345 -1445055494.20771-2345-1445055494.2077
Output for 5.2.7
1-2345 -1445055494.4547 1-2345 -1445055494.45471-2345-1445055494.4547
Output for 5.2.6
1-2345 -1445055494.6957 1-2345 -1445055494.69571-2345-1445055494.6958
Output for 5.2.5
1-2345 -1445055494.9333 1-2345 -1445055494.93331-2345-1445055494.9333
Output for 5.2.4
1-2345 -1445055495.1433 1-2345 -1445055495.14331-2345-1445055495.1433
Output for 5.2.3
1-2345 -1445055495.3575 1-2345 -1445055495.35761-2345-1445055495.3576
Output for 5.2.2
1-2345 -1445055495.5693 1-2345 -1445055495.56931-2345-1445055495.5693
Output for 5.2.1
1-2345 -1445055495.7828 1-2345 -1445055495.78291-2345-1445055495.7829
Output for 5.2.0
1-2345 -1445055496.013 1-2345 -1445055496.0131-2345-1445055496.013
Output for 5.1.6
1-2345 -1445055496.226 1-2345 -1445055496.2261-2345-1445055496.226
Output for 5.1.5
1-2345 -1445055496.4566 1-2345 -1445055496.45661-2345-1445055496.4566
Output for 5.1.4
1-2345 -1445055496.6824 1-2345 -1445055496.68251-2345-1445055496.6825
Output for 5.1.3
1-2345 -1445055496.9139 1-2345 -1445055496.91391-2345-1445055496.9139
Output for 5.1.2
1-2345 -1445055497.1542 1-2345 -1445055497.15421-2345-1445055497.1542
Output for 5.1.1
1-2345 -1445055497.3872 1-2345 -1445055497.38721-2345-1445055497.3872
Output for 5.1.0
1-2345 -1445055497.5938 1-2345 -1445055497.59381-2345-1445055497.5938
Output for 5.0.5
1-2345 -1445055497.7336 1-2345 -1445055497.73361-2345-1445055497.7336
Output for 5.0.4
1-2345 -1445055497.8846 1-2345 -1445055497.88461-2345-1445055497.8846
Output for 5.0.3
1-2345 -1445055498.0474 1-2345 -1445055498.04751-2345-1445055498.0475
Output for 5.0.2
1-2345 -1445055498.207 1-2345 -1445055498.2071-2345-1445055498.207
Output for 5.0.1
1-2345 -1445055498.3722 1-2345 -1445055498.37231-2345-1445055498.3723
Output for 5.0.0
1-2345 -1445055498.5241 1-2345 -1445055498.52421-2345-1445055498.5242
Output for 4.4.9
1-2345 -0.688852 1-2345 -0.6888811-2345-0.688889
Output for 4.4.8
1-2345 -0.929743 1-2345 -0.9297821-2345-0.929791
Output for 4.4.7
1-2345 -0.110097 1-2345 -0.1101291-2345-0.110136
Output for 4.4.6
1-2345 -0.251413 1-2345 -0.2514361-2345-0.25144
Output for 4.4.5
1-2345 -0.38418 1-2345 -0.38421-2345-0.384205
Output for 4.4.4
1-2345 -0.555912 1-2345 -0.5559391-2345-0.555945
Output for 4.4.3
1-2345 -0.740689 1-2345 -0.7407251-2345-0.740732
Output for 4.4.2
1-2345 -0.906119 1-2345 -0.9061491-2345-0.906156
Output for 4.4.1
1-2345 -0.066831 1-2345 -0.0668631-2345-0.066869
Output for 4.4.0
1-2345 -0.245974 1-2345 -0.2460091-2345-0.246015
Output for 4.3.11
1-2345 -0.400184 1-2345 -0.4002151-2345-0.40022
Output for 4.3.10
1-2345 -0.530795 1-2345 -0.5308171-2345-0.530824
Output for 4.3.9
1-2345 -0.661271 1-2345 -0.6612911-2345-0.661296
Output for 4.3.8
1-2345 -0.836105 1-2345 -0.8361371-2345-0.836147
Output for 4.3.7
1-2345 -0.99979 1-2345 -0.9998171-2345-0.999824
Output for 4.3.6
1-2345 -0.159232 1-2345 -0.1593051-2345-0.15931
Output for 4.3.5
1-2345 -0.337093 1-2345 -0.3371231-2345-0.33713
Output for 4.3.4
1-2345 -0.53932 1-2345 -0.5393491-2345-0.539356
Output for 4.3.3
1-2345 -0.673623 1-2345 -0.6736551-2345-0.673664
Output for 4.3.2
1-2345 -0.812316 1-2345 -0.812351-2345-0.812358
Output for 4.3.1
1-2345 -0.964963 1-2345 -0.9651-2345-0.965008
Output for 4.3.0
1-2345 -0.106102 1-2345 -0.1061371-2345-0.106149