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) . "\n"; $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/u9cZO on line 7 -1364229175.0037 1-2345 Warning: A non-numeric value encountered in /in/u9cZO on line 12 -1364229175.00381-2345 Warning: A non-numeric value encountered in /in/u9cZO on line 17 -1364229175.0038
Output for 7.0.14
1-2345 -1364229175.0039 1-2345 -1364229175.00391-2345 -1364229175.0039
Output for 7.0.6
1-2345 -1462227136.0224 1-2345 -1462227136.02251-2345 -1462227136.0225
Output for 7.0.5
1-2345 -1459597600.272 1-2345 -1459597600.2721-2345 -1459597600.272
Output for 7.0.4
1-2345 -1457559712.425 1-2345 -1457559712.4251-2345 -1457559712.425
Output for 7.0.3
1-2345 -1458252361.4408 1-2345 -1458252361.44091-2345 -1458252361.4409
Output for 7.0.2
1-2345 -1458550157.7853 1-2345 -1458550157.78531-2345 -1458550157.7853
Output for 7.0.1
1-2345 -1458721686.9326 1-2345 -1458721686.93261-2345 -1458721686.9326
Output for 7.0.0
1-2345 -1458992141.4886 1-2345 -1458992141.48861-2345 -1458992141.4886
Output for 5.6.21
1-2345 -1462123087.5786 1-2345 -1462123087.57861-2345 -1462123087.5786
Output for 5.6.20
1-2345 -1460185373.7293 1-2345 -1460185373.72931-2345 -1460185373.7293
Output for 5.6.19
1-2345 -1457290585.1254 1-2345 -1457290585.12541-2345 -1457290585.1254
Output for 5.6.18
1-2345 -1457939010.9057 1-2345 -1457939010.90571-2345 -1457939010.9057
Output for 5.6.17
1-2345 -1458355326.1331 1-2345 -1458355326.13311-2345 -1458355326.1331
Output for 5.6.16
1-2345 -1459081136.0018 1-2345 -1459081136.00191-2345 -1459081136.0019
Output for 5.6.15
1-2345 -1459171007.0521 1-2345 -1459171007.05221-2345 -1459171007.0522
Output for 5.6.14
1-2345 -1459526444.5769 1-2345 -1459526444.57691-2345 -1459526444.5769
Output for 5.6.13
1-2345 -1460663852.4463 1-2345 -1460663852.44631-2345 -1460663852.4463
Output for 5.6.12
1-2345 -1461056412.555 1-2345 -1461056412.5551-2345 -1461056412.555
Output for 5.6.11
1-2345 -1461341967.9469 1-2345 -1461341967.94691-2345 -1461341967.9469
Output for 5.6.10
1-2345 -1461520635.7981 1-2345 -1461520635.79811-2345 -1461520635.7981
Output for 5.6.9
1-2345 -1461711631.4513 1-2345 -1461711631.45131-2345 -1461711631.4513
Output for 5.6.8
1-2345 -1461911753.1224 1-2345 -1461911753.12241-2345 -1461911753.1224
Output for 5.6.7
1-2345 -1464106215.5328 1-2345 -1464106215.53281-2345 -1464106215.5328
Output for 5.5.35
1-2345 -1463862639.2382 1-2345 -1463862639.23821-2345 -1463862639.2382
Output for 5.5.34
1-2345 -1460291764.7766 1-2345 -1460291764.77661-2345 -1460291764.7766
Output for 5.5.33
1-2345 -1457426918.8119 1-2345 -1457426918.81191-2345 -1457426918.8119
Output for 5.5.32
1-2345 -1458064332.055 1-2345 -1458064332.0551-2345 -1458064332.055
Output for 5.5.31
1-2345 -1458452189.7312 1-2345 -1458452189.73121-2345 -1458452189.7312
Output for 5.5.30
1-2345 -1459437799.6262 1-2345 -1459437799.62621-2345 -1459437799.6262
Output for 5.5.29
1-2345 -1460800685.7852 1-2345 -1460800685.78531-2345 -1460800685.7853
Output for 5.5.28
1-2345 -1461154163.8827 1-2345 -1461154163.88271-2345 -1461154163.8827
Output for 5.5.27
1-2345 -1461250207.6972 1-2345 -1461250207.69721-2345 -1461250207.6972
Output for 5.5.26
1-2345 -1461615086.2895 1-2345 -1461615086.28951-2345 -1461615086.2895
Output for 5.5.25
1-2345 -1461809879.8005 1-2345 -1461809879.80061-2345 -1461809879.8006
Output for 5.5.24
1-2345 -1462010320.2113 1-2345 -1462010320.21141-2345 -1462010320.2114
Output for 5.4.45
1-2345 -1448079803.3715 1-2345 -1448079803.37151-2345 -1448079803.3715
Output for 5.4.44
1-2345 -1448079804.3689 1-2345 -1448079804.36891-2345 -1448079804.3689
Output for 5.4.43
1-2345 -1448079805.8075 1-2345 -1448079805.80751-2345 -1448079805.8076
Output for 5.4.42
1-2345 -1448079806.5449 1-2345 -1448079806.54491-2345 -1448079806.5449
Output for 5.4.41
1-2345 -1448079807.0377 1-2345 -1448079807.03781-2345 -1448079807.0378
Output for 5.4.40
1-2345 -1448079808.1888 1-2345 -1448079808.18881-2345 -1448079808.1888
Output for 5.4.39
1-2345 -1448079808.8466 1-2345 -1448079808.84671-2345 -1448079808.8467
Output for 5.4.38
1-2345 -1448079809.1915 1-2345 -1448079809.19151-2345 -1448079809.1915
Output for 5.4.37
1-2345 -1448079810.0835 1-2345 -1448079810.08351-2345 -1448079810.0835
Output for 5.4.36
1-2345 -1448079810.2411 1-2345 -1448079810.24111-2345 -1448079810.2411
Output for 5.4.35
1-2345 -1448079810.7662 1-2345 -1448079810.76621-2345 -1448079810.7662
Output for 5.4.34
1-2345 -1448079811.4896 1-2345 -1448079811.48961-2345 -1448079811.4896
Output for 5.4.32
1-2345 -1448079812.4669 1-2345 -1448079812.46691-2345 -1448079812.4669
Output for 5.4.31
1-2345 -1448079812.872 1-2345 -1448079812.87211-2345 -1448079812.8721
Output for 5.4.30
1-2345 -1448079813.405 1-2345 -1448079813.4051-2345 -1448079813.405
Output for 5.4.29
1-2345 -1448079813.5528 1-2345 -1448079813.55281-2345 -1448079813.5528
Output for 5.4.28
1-2345 -1448079813.8708 1-2345 -1448079813.87081-2345 -1448079813.8708
Output for 5.4.27
1-2345 -1448079814.2164 1-2345 -1448079814.21641-2345 -1448079814.2164
Output for 5.4.26
1-2345 -1448079814.5584 1-2345 -1448079814.55851-2345 -1448079814.5585
Output for 5.4.25
1-2345 -1448079814.8793 1-2345 -1448079814.87931-2345 -1448079814.8793
Output for 5.4.24
1-2345 -1448079815.3457 1-2345 -1448079815.34571-2345 -1448079815.3457
Output for 5.4.23
1-2345 -1448079815.5446 1-2345 -1448079815.54461-2345 -1448079815.5446
Output for 5.4.22
1-2345 -1448079816.2084 1-2345 -1448079816.20841-2345 -1448079816.2084
Output for 5.4.21
1-2345 -1448079816.3472 1-2345 -1448079816.34721-2345 -1448079816.3472
Output for 5.4.20
1-2345 -1448079816.6847 1-2345 -1448079816.68481-2345 -1448079816.6848
Output for 5.4.19
1-2345 -1448079817.2287 1-2345 -1448079817.22871-2345 -1448079817.2287
Output for 5.4.18
1-2345 -1448079817.5799 1-2345 -1448079817.581-2345 -1448079817.58
Output for 5.4.17
1-2345 -1448079818.1084 1-2345 -1448079818.10841-2345 -1448079818.1084
Output for 5.4.16
1-2345 -1448079818.5984 1-2345 -1448079818.59841-2345 -1448079818.5984
Output for 5.4.15
1-2345 -1448079818.7776 1-2345 -1448079818.77761-2345 -1448079818.7776
Output for 5.4.14
1-2345 -1448079819.1269 1-2345 -1448079819.12691-2345 -1448079819.1269
Output for 5.4.13
1-2345 -1448079819.5105 1-2345 -1448079819.51051-2345 -1448079819.5105
Output for 5.4.12
1-2345 -1448079819.8491 1-2345 -1448079819.84921-2345 -1448079819.8492
Output for 5.4.11
1-2345 -1448079820.3308 1-2345 -1448079820.33081-2345 -1448079820.3308
Output for 5.4.10
1-2345 -1448079820.668 1-2345 -1448079820.66811-2345 -1448079820.6681
Output for 5.4.9
1-2345 -1448079820.8467 1-2345 -1448079820.84681-2345 -1448079820.8468
Output for 5.4.8
1-2345 -1448079821.359 1-2345 -1448079821.35911-2345 -1448079821.3591
Output for 5.4.7
1-2345 -1448079821.7076 1-2345 -1448079821.70761-2345 -1448079821.7076
Output for 5.4.6
1-2345 -1448079821.8828 1-2345 -1448079821.88291-2345 -1448079821.8829
Output for 5.4.5
1-2345 -1448079822.4216 1-2345 -1448079822.42161-2345 -1448079822.4216
Output for 5.4.4
1-2345 -1448079822.8387 1-2345 -1448079822.83881-2345 -1448079822.8388
Output for 5.4.3
1-2345 -1448079823.0127 1-2345 -1448079823.01271-2345 -1448079823.0127
Output for 5.4.2
1-2345 -1448079823.5438 1-2345 -1448079823.54381-2345 -1448079823.5439
Output for 5.4.1
1-2345 -1448079823.8764 1-2345 -1448079823.87641-2345 -1448079823.8764
Output for 5.4.0
1-2345 -1448079824.0487 1-2345 -1448079824.04871-2345 -1448079824.0487
Output for 5.3.29
1-2345 -1448079812.7046 1-2345 -1448079812.70461-2345 -1448079812.7046
Output for 5.3.28
1-2345 -1448079815.8936 1-2345 -1448079815.89361-2345 -1448079815.8937
Output for 5.3.27
1-2345 -1448079817.932 1-2345 -1448079817.9321-2345 -1448079817.932
Output for 5.3.26
1-2345 -1448079818.4304 1-2345 -1448079818.43041-2345 -1448079818.4304
Output for 5.3.25
1-2345 -1448079818.9519 1-2345 -1448079818.9521-2345 -1448079818.952
Output for 5.3.24
1-2345 -1448079819.3352 1-2345 -1448079819.33531-2345 -1448079819.3353
Output for 5.3.23
1-2345 -1448079819.6714 1-2345 -1448079819.67141-2345 -1448079819.6714
Output for 5.3.22
1-2345 -1448079820.0092 1-2345 -1448079820.00931-2345 -1448079820.0093
Output for 5.3.21
1-2345 -1448079820.1747 1-2345 -1448079820.17481-2345 -1448079820.1748
Output for 5.3.20
1-2345 -1448079820.4972 1-2345 -1448079820.49721-2345 -1448079820.4972
Output for 5.3.19
1-2345 -1448079821.0229 1-2345 -1448079821.02291-2345 -1448079821.0229
Output for 5.3.18
1-2345 -1448079821.1766 1-2345 -1448079821.17671-2345 -1448079821.1767
Output for 5.3.17
1-2345 -1448079821.5354 1-2345 -1448079821.53541-2345 -1448079821.5354
Output for 5.3.16
1-2345 -1448079822.1057 1-2345 -1448079822.10571-2345 -1448079822.1057
Output for 5.3.15
1-2345 -1448079822.2819 1-2345 -1448079822.2821-2345 -1448079822.282
Output for 5.3.14
1-2345 -1448079822.6698 1-2345 -1448079822.66981-2345 -1448079822.6698
Output for 5.3.13
1-2345 -1448079823.2035 1-2345 -1448079823.20351-2345 -1448079823.2035
Output for 5.3.12
1-2345 -1448079823.3661 1-2345 -1448079823.36611-2345 -1448079823.3661
Output for 5.3.11
1-2345 -1448079823.7191 1-2345 -1448079823.71911-2345 -1448079823.7191
Output for 5.3.10
1-2345 -1448079824.2137 1-2345 -1448079824.21371-2345 -1448079824.2138
Output for 5.3.9
1-2345 -1448079824.3818 1-2345 -1448079824.38181-2345 -1448079824.3818
Output for 5.3.8
1-2345 -1448079824.5527 1-2345 -1448079824.55281-2345 -1448079824.5528
Output for 5.3.7
1-2345 -1448079824.7235 1-2345 -1448079824.72351-2345 -1448079824.7235
Output for 5.3.6
1-2345 -1448079824.884 1-2345 -1448079824.8841-2345 -1448079824.884
Output for 5.3.5
1-2345 -1448079825.0706 1-2345 -1448079825.07071-2345 -1448079825.0707
Output for 5.3.4
1-2345 -1448079825.5403 1-2345 -1448079825.54031-2345 -1448079825.5403
Output for 5.3.3
1-2345 -1448079825.895 1-2345 -1448079825.8951-2345 -1448079825.8951
Output for 5.3.2
1-2345 -1448079826.2298 1-2345 -1448079826.22981-2345 -1448079826.2299
Output for 5.3.1
1-2345 -1448079826.7895 1-2345 -1448079826.78951-2345 -1448079826.7895
Output for 5.3.0
1-2345 -1448079827.1107 1-2345 -1448079827.11071-2345 -1448079827.1107
Output for 5.2.17
1-2345 -1448079825.2154 1-2345 -1448079825.21541-2345 -1448079825.2154
Output for 5.2.16
1-2345 -1448079825.3742 1-2345 -1448079825.37421-2345 -1448079825.3742
Output for 5.2.15
1-2345 -1448079825.7011 1-2345 -1448079825.70111-2345 -1448079825.7011
Output for 5.2.14
1-2345 -1448079826.0566 1-2345 -1448079826.05661-2345 -1448079826.0566
Output for 5.2.13
1-2345 -1448079826.3896 1-2345 -1448079826.38961-2345 -1448079826.3896
Output for 5.2.12
1-2345 -1448079826.6148 1-2345 -1448079826.61481-2345 -1448079826.6148
Output for 5.2.11
1-2345 -1448079826.9394 1-2345 -1448079826.93951-2345 -1448079826.9395
Output for 5.2.10
1-2345 -1448079827.268 1-2345 -1448079827.26811-2345 -1448079827.2681
Output for 5.2.9
1-2345 -1448079827.423 1-2345 -1448079827.42311-2345 -1448079827.4231
Output for 5.2.8
1-2345 -1448079827.6573 1-2345 -1448079827.65741-2345 -1448079827.6574
Output for 5.2.7
1-2345 -1448079827.8188 1-2345 -1448079827.81881-2345 -1448079827.8188
Output for 5.2.6
1-2345 -1448079828.1053 1-2345 -1448079828.10541-2345 -1448079828.1054
Output for 5.2.5
1-2345 -1448079828.3807 1-2345 -1448079828.38071-2345 -1448079828.3807
Output for 5.2.4
1-2345 -1448079828.5373 1-2345 -1448079828.53741-2345 -1448079828.5374
Output for 5.2.3
1-2345 -1448079828.6925 1-2345 -1448079828.69251-2345 -1448079828.6925
Output for 5.2.2
1-2345 -1448079828.8399 1-2345 -1448079828.83991-2345 -1448079828.8399
Output for 5.2.1
1-2345 -1448079829.3512 1-2345 -1448079829.35121-2345 -1448079829.3512
Output for 5.2.0
1-2345 -1448079829.5042 1-2345 -1448079829.50421-2345 -1448079829.5042
Output for 5.1.6
1-2345 -1448079829.6343 1-2345 -1448079829.63441-2345 -1448079829.6344
Output for 5.1.5
1-2345 -1448079829.8908 1-2345 -1448079829.89081-2345 -1448079829.8908
Output for 5.1.4
1-2345 -1448079830.1155 1-2345 -1448079830.11561-2345 -1448079830.1156
Output for 5.1.3
1-2345 -1448079830.2341 1-2345 -1448079830.23421-2345 -1448079830.2342
Output for 5.1.2
1-2345 -1448079830.3748 1-2345 -1448079830.37481-2345 -1448079830.3748
Output for 5.1.1
1-2345 -1448079830.6268 1-2345 -1448079830.62691-2345 -1448079830.6269
Output for 5.1.0
1-2345 -1448079830.7781 1-2345 -1448079830.77811-2345 -1448079830.7782
Output for 5.0.5
1-2345 -1448079831.0375 1-2345 -1448079831.03751-2345 -1448079831.0375
Output for 5.0.4
1-2345 -1448079831.3527 1-2345 -1448079831.35271-2345 -1448079831.3527
Output for 5.0.3
1-2345 -1448079831.6179 1-2345 -1448079831.61791-2345 -1448079831.6179
Output for 5.0.2
1-2345 -1448079831.8807 1-2345 -1448079831.88071-2345 -1448079831.8807
Output for 5.0.1
1-2345 -1448079832.1296 1-2345 -1448079832.12961-2345 -1448079832.1296
Output for 5.0.0
1-2345 -1448079832.2681 1-2345 -1448079832.26821-2345 -1448079832.2682
Output for 4.4.9
1-2345 -0.943963 1-2345 -0.9440011-2345 -0.94401
Output for 4.4.8
1-2345 -0.229118 1-2345 -0.2291661-2345 -0.22918
Output for 4.4.7
1-2345 -0.960076 1-2345 -0.9601171-2345 -0.960125
Output for 4.4.6
1-2345 -0.075519 1-2345 -0.0755581-2345 -0.075568
Output for 4.4.5
1-2345 -0.197275 1-2345 -0.1973171-2345 -0.197329
Output for 4.4.4
1-2345 -0.761699 1-2345 -0.7617441-2345 -0.761758
Output for 4.4.3
1-2345 -0.996615 1-2345 -0.9966491-2345 -0.996659
Output for 4.4.2
1-2345 -0.482849 1-2345 -0.4828831-2345 -0.482889
Output for 4.4.1
1-2345 -0.90588 1-2345 -0.9059241-2345 -0.905935
Output for 4.4.0
1-2345 -0.224445 1-2345 -0.224481-2345 -0.224489
Output for 4.3.11
1-2345 -0.474004 1-2345 -0.4740421-2345 -0.474053
Output for 4.3.10
1-2345 -0.746003 1-2345 -0.7460391-2345 -0.746048
Output for 4.3.9
1-2345 -0.002704 1-2345 -0.002751-2345 -0.002766
Output for 4.3.8
1-2345 -0.398241 1-2345 -0.3982741-2345 -0.398282
Output for 4.3.7
1-2345 -0.52505 1-2345 -0.5250951-2345 -0.525105
Output for 4.3.6
1-2345 -0.64644 1-2345 -0.6464861-2345 -0.646501
Output for 4.3.5
1-2345 -0.774536 1-2345 -0.7745761-2345 -0.774588
Output for 4.3.4
1-2345 -0.918459 1-2345 -0.9184961-2345 -0.918505
Output for 4.3.3
1-2345 -0.037044 1-2345 -0.0370881-2345 -0.037107
Output for 4.3.2
1-2345 -0.156641 1-2345 -0.1566811-2345 -0.156692
Output for 4.3.1
1-2345 -0.277547 1-2345 -0.2775861-2345 -0.277597
Output for 4.3.0
1-2345 -0.397852 1-2345 -0.3978891-2345 -0.397899