3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $path = '/some/path/'; $start = microtime(true); for ($i = 0; $i < 100000; $i++) { if (substr( $path, -1 ) == '/') $path = substr( $path, 0, -1 ); } $end = microtime(true); echo "<br>\n" . $end - $start; $path = '/some/path'; $start = microtime(true); for ($i = 0; $i < 100000; $i++) { if (substr( $path, -1 ) == '/') $path = substr( $path, 0, -1 ); } $end = microtime(true); echo "<br>\n" . $end - $start; $path = '/some/path/'; $start = microtime(true); for ($i = 0; $i < 100000; $i++) { $path = rtrim($path, '/'); } $end = microtime(true); echo "<br>\n" . $end - $start; $path = '/some/path'; $start = microtime(true); for ($i = 0; $i < 100000; $i++) { $path = rtrim($path, '/'); } $end = microtime(true); echo "<br>\n" . $end - $start;
Output for 7.1.0
Warning: A non-numeric value encountered in /in/Ll7TA on line 13 -1373900452.0059 Warning: A non-numeric value encountered in /in/Ll7TA on line 25 -1373900452.0131 Warning: A non-numeric value encountered in /in/Ll7TA on line 37 -1373900452.0201 Warning: A non-numeric value encountered in /in/Ll7TA on line 49 -1373900452.0251
Output for 7.0.14
-1373900452.0038-1373900452.0116-1373900452.019-1373900452.0244
Output for 7.0.12
-1373900452.0039-1373900452.0134-1373900452.0233-1373900452.0286
Output for 7.0.6
-1462240079.9489-1462240079.9552-1462240079.9613-1462240079.9659
Output for 7.0.5
-1459609215.75-1459609215.7564-1459609215.7627-1459609215.7673
Output for 7.0.4
-1457574075.0941-1457574075.1006-1457574075.1071-1457574075.1114
Output for 7.0.3
-1458266100.3977-1458266100.4035-1458266100.409-1458266100.4131
Output for 7.0.2
-1458563282.8952-1458563282.9002-1458563282.9048-1458563282.908
Output for 7.0.1
-1458736841.7715-1458736841.7763-1458736841.7812-1458736841.7848
Output for 7.0.0
-1459004561.2908-1459004561.2974-1459004561.3038-1459004561.3084
Output for 5.6.28
-1373900452.0046-1373900452.0368-1373900452.0659-1373900452.0894
Output for 5.6.21
-1462135920.849-1462135920.8694-1462135920.8883-1462135920.9061
Output for 5.6.20
-1460196913.7398-1460196913.7625-1460196913.7829-1460196913.8025
Output for 5.6.19
-1457310364.291-1457310364.3061-1457310364.3208-1457310364.3364
Output for 5.6.18
-1457958063.6786-1457958063.693-1457958063.7073-1457958063.722
Output for 5.6.17
-1458368674.3043-1458368674.3237-1458368674.3385-1458368674.3537
Output for 5.6.16
-1459093755.8817-1459093755.903-1459093755.9223-1459093755.9414
Output for 5.6.15
-1459183306.7128-1459183306.7346-1459183306.7547-1459183306.7743
Output for 5.6.14
-1459538232.2037-1459538232.2273-1459538232.2488-1459538232.2694
Output for 5.6.13
-1460675673.754-1460675673.7698-1460675673.7843-1460675673.7993
Output for 5.6.12
-1461068441.9808-1461068442.0012-1461068442.0198-1461068442.0378
Output for 5.6.11
-1461353801.0591-1461353801.0802-1461353801.1025-1461353801.1218
Output for 5.6.10
-1461532471.3583-1461532471.379-1461532471.3955-1461532471.412
Output for 5.6.9
-1461724026.7431-1461724026.7568-1461724026.7703-1461724026.7843
Output for 5.6.8
-1461924665.589-1461924665.6033-1461924665.6176-1461924665.6327
Output for 5.6.7
-1464126588.949-1464126588.9677-1464126588.9849-1464126589.0014
Output for 5.5.35
-1463876256.3776-1463876256.395-1463876256.4123-1463876256.429
Output for 5.5.34
-1460304764.2244-1460304764.245-1460304764.2637-1460304764.2822
Output for 5.5.33
-1457440532.2362-1457440532.2602-1457440532.2798-1457440532.3026
Output for 5.5.32
-1458152343.6842-1458152343.6987-1458152343.7131-1458152343.7284
Output for 5.5.31
-1458465368.1323-1458465368.1467-1458465368.1611-1458465368.1762
Output for 5.5.30
-1459449779.9848-1459449780.0061-1459449780.0241-1459449780.0415
Output for 5.5.29
-1460812576.3313-1460812576.3462-1460812576.3611-1460812576.3766
Output for 5.5.28
-1461166656.2817-1461166656.298-1461166656.3133-1461166656.3287
Output for 5.5.27
-1461261895.9768-1461261895.9962-1461261896.0153-1461261896.0411
Output for 5.5.26
-1461627849.6976-1461627849.7166-1461627849.7343-1461627849.7501
Output for 5.5.25
-1461822278.3966-1461822278.4185-1461822278.4388-1461822278.4584
Output for 5.5.24
-1462021814.7922-1462021814.8173-1462021814.839-1462021814.8575
Output for 5.4.45
-1455793802.2662-1455793802.28-1455793802.2939-1455793802.3087
Output for 5.4.44
-1455793802.9236-1455793802.937-1455793802.9504-1455793802.9648
Output for 5.4.43
-1455793803.9692-1455793803.9825-1455793803.9958-1455793804.0102
Output for 5.4.42
-1455793804.1652-1455793804.1789-1455793804.1926-1455793804.2071
Output for 5.4.41
-1455793805.1593-1455793805.1734-1455793805.1871-1455793805.2022
Output for 5.4.40
-1455793805.9802-1455793805.9937-1455793806.0071-1455793806.0215
Output for 5.4.39
-1455793806.6239-1455793806.6375-1455793806.651-1455793806.6651
Output for 5.4.38
-1455793807.0072-1455793807.0216-1455793807.036-1455793807.0509
Output for 5.4.37
-1455793807.842-1455793807.8577-1455793807.8735-1455793807.8894
Output for 5.4.36
-1455793808.4553-1455793808.4715-1455793808.487-1455793808.5025
Output for 5.4.35
-1455793809.1756-1455793809.1984-1455793809.2193-1455793809.2393
Output for 5.4.34
-1455793809.8868-1455793809.9051-1455793809.9221-1455793809.9389
Output for 5.4.32
-1455793811.1181-1455793811.1388-1455793811.1581-1455793811.1764
Output for 5.4.31
-1455793811.6736-1455793811.6993-1455793811.7249-1455793811.7419
Output for 5.4.30
-1455793812.4694-1455793812.492-1455793812.5117-1455793812.5281
Output for 5.4.29
-1455793812.7208-1455793812.7422-1455793812.7622-1455793812.78
Output for 5.4.28
-1455793813.1875-1455793813.2025-1455793813.2166-1455793813.2318
Output for 5.4.27
-1455793813.6933-1455793813.7151-1455793813.7349-1455793813.7546
Output for 5.4.26
-1455793814.2658-1455793814.2867-1455793814.3057-1455793814.325
Output for 5.4.25
-1455793814.9814-1455793815.0041-1455793815.0254-1455793815.0452
Output for 5.4.24
-1455793815.5114-1455793815.5361-1455793815.5556-1455793815.5752
Output for 5.4.23
-1455793815.7738-1455793815.7956-1455793815.8157-1455793815.8356
Output for 5.4.22
-1455793816.8502-1455793816.8718-1455793816.8914-1455793816.9107
Output for 5.4.21
-1455793817.1078-1455793817.1298-1455793817.15-1455793817.1695
Output for 5.4.20
-1455793817.5601-1455793817.575-1455793817.5899-1455793817.6055
Output for 5.4.19
-1455793818.2616-1455793818.2792-1455793818.2933-1455793818.3081
Output for 5.4.18
-1455793818.772-1455793818.7945-1455793818.8137-1455793818.831
Output for 5.4.17
-1455793819.5338-1455793819.5563-1455793819.577-1455793819.5969
Output for 5.4.16
-1455793820.0564-1455793820.0796-1455793820.0999-1455793820.1198
Output for 5.4.15
-1455793820.7843-1455793820.7996-1455793820.8146-1455793820.8308
Output for 5.4.14
-1455793820.9845-1455793820.9988-1455793821.0132-1455793821.0287
Output for 5.4.13
-1455793821.412-1455793821.4319-1455793821.4512-1455793821.4698
Output for 5.4.12
-1455793821.9224-1455793821.9424-1455793821.9636-1455793821.9835
Output for 5.4.11
-1455793822.728-1455793822.7502-1455793822.7708-1455793822.7905
Output for 5.4.10
-1455793823.1634-1455793823.1791-1455793823.1941-1455793823.2094
Output for 5.4.9
-1455793823.3746-1455793823.3928-1455793823.4099-1455793823.4286
Output for 5.4.8
-1455793824.172-1455793824.1946-1455793824.2154-1455793824.2359
Output for 5.4.7
-1455793824.6269-1455793824.6489-1455793824.6692-1455793824.6894
Output for 5.4.6
-1455793824.8935-1455793824.9159-1455793824.9366-1455793824.9567
Output for 5.4.5
-1455793825.6482-1455793825.6671-1455793825.6847-1455793825.702
Output for 5.4.4
-1455793826.1564-1455793826.1765-1455793826.195-1455793826.2131
Output for 5.4.3
-1455793826.4036-1455793826.4254-1455793826.4452-1455793826.4648
Output for 5.4.2
-1455793827.1442-1455793827.1583-1455793827.1724-1455793827.1873
Output for 5.4.1
-1455793827.6425-1455793827.6653-1455793827.6858-1455793827.7061
Output for 5.4.0
-1455793827.8854-1455793827.9062-1455793827.9243-1455793827.9393
Output for 5.3.29
-1455793811.4005-1455793811.4244-1455793811.4461-1455793811.4685
Output for 5.3.28
-1455793816.3193-1455793816.3439-1455793816.3669-1455793816.3901
Output for 5.3.27
-1455793819.2612-1455793819.2857-1455793819.3081-1455793819.3315
Output for 5.3.26
-1455793820.3204-1455793820.3455-1455793820.3681-1455793820.3913
Output for 5.3.25
-1455793820.5607-1455793820.5782-1455793820.5958-1455793820.6156
Output for 5.3.24
-1455793821.1898-1455793821.2073-1455793821.2238-1455793821.2421
Output for 5.3.23
-1455793821.6854-1455793821.7091-1455793821.7303-1455793821.7523
Output for 5.3.22
-1455793822.1869-1455793822.2134-1455793822.2371-1455793822.2607
Output for 5.3.21
-1455793822.4589-1455793822.4845-1455793822.5075-1455793822.5306
Output for 5.3.20
-1455793822.9455-1455793822.9626-1455793822.9795-1455793822.9982
Output for 5.3.19
-1455793823.6053-1455793823.626-1455793823.6451-1455793823.6641
Output for 5.3.18
-1455793823.9022-1455793823.9276-1455793823.9506-1455793823.9744
Output for 5.3.17
-1455793824.3864-1455793824.4027-1455793824.419-1455793824.4372
Output for 5.3.16
-1455793825.1157-1455793825.1335-1455793825.1505-1455793825.169
Output for 5.3.15
-1455793825.356-1455793825.381-1455793825.4034-1455793825.4262
Output for 5.3.14
-1455793825.8964-1455793825.9233-1455793825.945-1455793825.9647
Output for 5.3.13
-1455793826.651-1455793826.675-1455793826.6968-1455793826.7195
Output for 5.3.12
-1455793826.9135-1455793826.9384-1455793826.9608-1455793826.9837
Output for 5.3.11
-1455793827.3787-1455793827.4132-1455793827.4316-1455793827.4508
Output for 5.3.10
-1455793828.1245-1455793828.1484-1455793828.169-1455793828.1919
Output for 5.3.9
-1455793828.386-1455793828.4108-1455793828.4329-1455793828.4553
Output for 5.3.8
-1455793828.635-1455793828.6566-1455793828.6765-1455793828.6971
Output for 5.3.7
-1455793828.8934-1455793828.9194-1455793828.9433-1455793828.9638
Output for 5.3.6
-1455793829.1489-1455793829.1732-1455793829.1952-1455793829.2176
Output for 5.3.5
-1455793829.3982-1455793829.4234-1455793829.4435-1455793829.4643
Output for 5.3.4
-1455793830.0942-1455793830.1162-1455793830.1359-1455793830.1567
Output for 5.3.3
-1455793830.5523-1455793830.578-1455793830.6011-1455793830.6247
Output for 5.3.2
-1455793831.1379-1455793831.1632-1455793831.1864-1455793831.2094
Output for 5.3.1
-1455793831.8428-1455793831.8595-1455793831.8761-1455793831.8946
Output for 5.3.0
-1455793832.4142-1455793832.441-1455793832.4648-1455793832.4855
Output for 5.2.17
-1455793829.6185-1455793829.6376-1455793829.6564-1455793829.6767
Output for 5.2.16
-1455793829.8396-1455793829.8625-1455793829.8828-1455793829.9038
Output for 5.2.15
-1455793830.3038-1455793830.3214-1455793830.339-1455793830.3577
Output for 5.2.14
-1455793830.8677-1455793830.8942-1455793830.9181-1455793830.9411
Output for 5.2.13
-1455793831.3667-1455793831.3879-1455793831.4077-1455793831.427
Output for 5.2.12
-1455793831.603-1455793831.6318-1455793831.6569-1455793831.6807
Output for 5.2.11
-1455793832.1281-1455793832.1578-1455793832.1873-1455793832.2153
Output for 5.2.10
-1455793832.6659-1455793832.6944-1455793832.7195-1455793832.7438
Output for 5.2.9
-1455793832.9195-1455793832.9435-1455793832.9641-1455793832.9842
Output for 5.2.8
-1455793833.132-1455793833.1513-1455793833.1706-1455793833.1891
Output for 5.2.7
-1455793833.3714-1455793833.4016-1455793833.4282-1455793833.4536
Output for 5.2.6
-1455793833.8271-1455793833.8454-1455793833.8631-1455793833.8817
Output for 5.2.5
-1455793834.3451-1455793834.3729-1455793834.398-1455793834.4218
Output for 5.2.4
-1455793834.5802-1455793834.6015-1455793834.6213-1455793834.641
Output for 5.2.3
-1455793834.8224-1455793834.8508-1455793834.8761-1455793834.9005
Output for 5.2.2
-1455793835.0787-1455793835.1141-1455793835.1378-1455793835.1604
Output for 5.2.1
-1455793836.1296-1455793836.1468-1455793836.164-1455793836.1824
Output for 5.2.0
-1455793836.3303-1455793836.35-1455793836.3687-1455793836.387
Output for 5.1.6
-1455793836.5326-1455793836.5578-1455793836.5806-1455793836.6012
Output for 5.1.5
-1455793837.0567-1455793837.0832-1455793837.1093-1455793837.1344
Output for 5.1.4
-1455793837.5852-1455793837.6123-1455793837.6318-1455793837.6504
Output for 5.1.3
-1455793837.8389-1455793837.8566-1455793837.8744-1455793837.8917
Output for 5.1.2
-1455793838.0624-1455793838.0925-1455793838.1174-1455793838.1403
Output for 5.1.1
-1455793838.556-1455793838.5786-1455793838.5999-1455793838.6192
Output for 5.1.0
-1455793838.7942-1455793838.8239-1455793838.8495-1455793838.8719
Output for 5.0.5
-1455793839.3234-1455793839.4067-1455793839.4422-1455793839.4722
Output for 5.0.4
-1455793839.9145-1455793839.9526-1455793839.9938-1455793840.0374
Output for 5.0.3
-1455793840.4699-1455793840.5041-1455793840.5348-1455793840.5634
Output for 5.0.2
-1455793840.9869-1455793841.0225-1455793841.0613-1455793841.1015
Output for 5.0.1
-1455793841.5612-1455793841.5949-1455793841.6253-1455793841.6541
Output for 5.0.0
-1455793841.8641-1455793841.931-1455793841.9825-1455793842.013
Output for 4.4.9
-0.589147-0.617109-0.644867-0.673345
Output for 4.4.8
-0.034485-0.083358-0.123056-0.158105
Output for 4.4.7
-0.293609-0.326445-0.357603-0.385727
Output for 4.4.6
-0.556596-0.604462-0.644113-0.676141
Output for 4.4.5
-0.840941-0.895486-0.933735-0.971537
Output for 4.4.4
-0.753817-0.789349-0.820787-0.852407
Output for 4.4.3
-0.287625-0.334798-0.373546-0.40733
Output for 4.4.2
-0.278926-0.315918-0.351546-0.386117
Output for 4.4.1
-0.026846-0.074706-0.114431-0.15322
Output for 4.4.0
-0.627875-0.655757-0.683586-0.712516
Output for 4.3.11
-0.197467-0.230463-0.262372-0.294418
Output for 4.3.10
-0.721553-0.765433-0.800654-0.832397
Output for 4.3.9
-0.284741-0.337005-0.375501-0.405141
Output for 4.3.8
-0.198838-0.24634-0.282404-0.313649
Output for 4.3.7
-0.482381-0.532972-0.57489-0.609818
Output for 4.3.6
-0.77459-0.825037-0.863734-0.896761
Output for 4.3.5
-0.06045-0.120218-0.162707-0.195911
Output for 4.3.4
-0.363845-0.399747-0.431535-0.459708
Output for 4.3.3
-0.601273-0.634164-0.66338-0.690492
Output for 4.3.2
-0.831344-0.859498-0.887808-0.914991
Output for 4.3.1
-0.076965-0.125116-0.163618-0.196819
Output for 4.3.0
-0.38459-0.417179-0.44636-0.473146