3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $path = '/some/path/'; $start = microtime(true); for ($i = 0; $i < 10000; $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 < 10000; $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 < 10000; $i++) { $path = rtrim($path, '/'); } $end = microtime(true); echo "<br>\n" . $end - $start; $path = '/some/path'; $start = microtime(true); for ($i = 0; $i < 10000; $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/6ge3Y on line 13 -1373900387.0063 Warning: A non-numeric value encountered in /in/6ge3Y on line 25 -1373900387.0071 Warning: A non-numeric value encountered in /in/6ge3Y on line 37 -1373900387.0079 Warning: A non-numeric value encountered in /in/6ge3Y on line 49 -1373900387.0084
Output for 7.0.14
-1373900387.0039-1373900387.0047-1373900387.0055-1373900387.0061
Output for 7.0.6
-1462290264.3984-1462290264.3989-1462290264.3993-1462290264.3997
Output for 7.0.5
-1460574500.5682-1460574500.5688-1460574500.5693-1460574500.5696
Output for 7.0.4
-1460574501.3173-1460574501.3178-1460574501.3182-1460574501.3186
Output for 7.0.3
-1460574502.2678-1460574502.2685-1460574502.2691-1460574502.2696
Output for 7.0.2
-1460574502.838-1460574502.8387-1460574502.8393-1460574502.8398
Output for 7.0.1
-1460574503.0331-1460574503.0339-1460574503.0346-1460574503.0352
Output for 7.0.0
-1460574503.5117-1460574503.5125-1460574503.5133-1460574503.5138
Output for hhvm-3.12.0
-1460574501.6106-1460574501.6121-1460574501.6136-1460574501.615
Output for hhvm-3.10.0
-1460574504.1941-1460574504.1958-1460574504.1974-1460574504.199
Output for 5.6.28
-1373900387.0046-1373900387.0079-1373900387.0111-1373900387.014
Output for 5.6.21
-1462186483.5376-1462186483.5396-1462186483.5416-1462186483.5436
Output for 5.6.20
-1460574500.2193-1460574500.221-1460574500.2228-1460574500.2247
Output for 5.6.19
-1460574500.9601-1460574500.9624-1460574500.9647-1460574500.9671
Output for 5.6.18
-1460574501.8078-1460574501.8102-1460574501.8128-1460574501.8153
Output for 5.6.17
-1460574502.4465-1460574502.4486-1460574502.4506-1460574502.4526
Output for 5.6.16
-1460574503.6704-1460574503.672-1460574503.6735-1460574503.6752
Output for 5.6.15
-1460574503.8743-1460574503.8766-1460574503.879-1460574503.8815
Output for 5.6.14
-1460574504.3901-1460574504.392-1460574504.3939-1460574504.3959
Output for 5.6.13
-1460574504.7618-1460574504.764-1460574504.7662-1460574504.7685
Output for 5.6.12
-1460574505.5804-1460574505.5826-1460574505.5848-1460574505.5871
Output for 5.6.11
-1460574506.1479-1460574506.1493-1460574506.1507-1460574506.1522
Output for 5.6.10
-1460574507.1979-1460574507.1995-1460574507.201-1460574507.2027
Output for 5.6.9
-1460574507.3997-1460574507.402-1460574507.4044-1460574507.4067
Output for 5.6.8
-1460574508.3268-1460574508.3284-1460574508.3301-1460574508.3316
Output for 5.6.7
-1460574508.7406-1460574508.743-1460574508.7454-1460574508.7477
Output for 5.6.6
-1460574509.5381-1460574509.5405-1460574509.543-1460574509.5453
Output for 5.6.5
-1460574510.2805-1460574510.2829-1460574510.2852-1460574510.2875
Output for 5.6.4
-1460574510.8911-1460574510.8933-1460574510.8954-1460574510.8976
Output for 5.6.3
-1460574511.2478-1460574511.2497-1460574511.2515-1460574511.2539
Output for 5.6.2
-1460574511.9953-1460574511.9972-1460574511.9991-1460574512.0009
Output for 5.6.1
-1460574512.1762-1460574512.1782-1460574512.1802-1460574512.1823
Output for 5.6.0
-1460574512.3596-1460574512.3616-1460574512.3636-1460574512.3655
Output for 5.5.35
-1463936677.59-1463936677.5921-1463936677.5942-1463936677.5964
Output for 5.5.34
-1460574500.3995-1460574500.4015-1460574500.4035-1460574500.4055
Output for 5.5.33
-1460574501.1612-1460574501.1636-1460574501.1659-1460574501.1683
Output for 5.5.32
-1460574502.0102-1460574502.0126-1460574502.015-1460574502.0174
Output for 5.5.31
-1460574502.643-1460574502.6454-1460574502.6477-1460574502.6501
Output for 5.5.30
-1460574504.5659-1460574504.5677-1460574504.5695-1460574504.5714
Output for 5.5.29
-1460574505.1444-1460574505.1462-1460574505.1481-1460574505.15
Output for 5.5.28
-1460574505.7841-1460574505.7864-1460574505.7887-1460574505.7911
Output for 5.5.27
-1460574506.3966-1460574506.399-1460574506.4013-1460574506.4037
Output for 5.5.26
-1460574506.7999-1460574506.8023-1460574506.8047-1460574506.8071
Output for 5.5.25
-1460574507.7775-1460574507.7791-1460574507.7807-1460574507.7824
Output for 5.5.24
-1460574508.5224-1460574508.5255-1460574508.5278-1460574508.5301
Output for 5.5.23
-1460574509.1436-1460574509.1458-1460574509.148-1460574509.1503
Output for 5.5.22
-1460574509.7088-1460574509.7105-1460574509.7123-1460574509.7142
Output for 5.5.21
-1460574509.9027-1460574509.9051-1460574509.9073-1460574509.9098
Output for 5.5.20
-1460574510.6953-1460574510.6977-1460574510.7001-1460574510.7026
Output for 5.5.19
-1460574511.4478-1460574511.4501-1460574511.4526-1460574511.4552
Output for 5.5.18
-1460574511.6524-1460574511.6549-1460574511.6573-1460574511.6598
Output for 5.5.16
-1460574512.5204-1460574512.522-1460574512.5235-1460574512.5252
Output for 5.5.15
-1460574513.2524-1460574513.2545-1460574513.2566-1460574513.2589
Output for 5.5.14
-1460574513.4526-1460574513.4551-1460574513.4576-1460574513.4601
Output for 5.5.13
-1460574514.0636-1460574514.066-1460574514.0684-1460574514.0707
Output for 5.5.12
-1460574514.4688-1460574514.4713-1460574514.4738-1460574514.4763
Output for 5.5.11
-1460574514.8345-1460574514.8367-1460574514.8389-1460574514.841
Output for 5.5.10
-1460574515.2501-1460574515.2522-1460574515.2542-1460574515.2564
Output for 5.5.9
-1460574515.6327-1460574515.6351-1460574515.6374-1460574515.6398
Output for 5.5.8
-1460574515.8266-1460574515.8296-1460574515.8325-1460574515.8356
Output for 5.5.7
-1460574516.418-1460574516.4199-1460574516.4217-1460574516.4236
Output for 5.5.6
-1460574516.8045-1460574516.8069-1460574516.8095-1460574516.812
Output for 5.5.5
-1460574517.3731-1460574517.375-1460574517.377-1460574517.379
Output for 5.5.4
-1460574517.683-1460574517.6845-1460574517.6861-1460574517.6877
Output for 5.5.3
-1460574518.1449-1460574518.1473-1460574518.1495-1460574518.1516
Output for 5.5.2
-1460574518.3335-1460574518.3358-1460574518.3382-1460574518.3407
Output for 5.5.1
-1460574518.7021-1460574518.7045-1460574518.7069-1460574518.7093
Output for 5.5.0
-1460574519.2676-1460574519.2691-1460574519.2707-1460574519.2723
Output for 5.4.45
-1460574504.9683-1460574504.9701-1460574504.972-1460574504.974
Output for 5.4.44
-1460574505.988-1460574505.99-1460574505.9921-1460574505.9942
Output for 5.4.43
-1460574506.5987-1460574506.601-1460574506.6032-1460574506.6055
Output for 5.4.42
-1460574506.9705-1460574506.9722-1460574506.9738-1460574506.9755
Output for 5.4.41
-1460574507.5975-1460574507.5999-1460574507.6022-1460574507.6045
Output for 5.4.40
-1460574508.1672-1460574508.1699-1460574508.1725-1460574508.1748
Output for 5.4.39
-1460574508.9407-1460574508.9429-1460574508.9451-1460574508.9474
Output for 5.4.38
-1460574509.3342-1460574509.3364-1460574509.3386-1460574509.3408
Output for 5.4.37
-1460574510.0836-1460574510.0856-1460574510.0875-1460574510.0895
Output for 5.4.36
-1460574510.4903-1460574510.4928-1460574510.4953-1460574510.4978
Output for 5.4.35
-1460574511.082-1460574511.0843-1460574511.0866-1460574511.089
Output for 5.4.34
-1460574511.8234-1460574511.825-1460574511.8264-1460574511.8279
Output for 5.4.32
-1460574512.6945-1460574512.6962-1460574512.698-1460574512.7002
Output for 5.4.31
-1460574513.0601-1460574513.0626-1460574513.0649-1460574513.0674
Output for 5.4.30
-1460574513.652-1460574513.6539-1460574513.6558-1460574513.6577
Output for 5.4.29
-1460574513.8473-1460574513.8496-1460574513.8518-1460574513.8542
Output for 5.4.28
-1460574514.2602-1460574514.2626-1460574514.265-1460574514.2675
Output for 5.4.27
-1460574514.6493-1460574514.6512-1460574514.6531-1460574514.6551
Output for 5.4.26
-1460574515.0334-1460574515.0354-1460574515.0383-1460574515.0404
Output for 5.4.25
-1460574515.4434-1460574515.4455-1460574515.4477-1460574515.4499
Output for 5.4.24
-1460574516.0253-1460574516.0272-1460574516.0291-1460574516.0311
Output for 5.4.23
-1460574516.2173-1460574516.2197-1460574516.2219-1460574516.2242
Output for 5.4.22
-1460574516.9627-1460574516.9642-1460574516.9656-1460574516.9672
Output for 5.4.21
-1460574517.1993-1460574517.202-1460574517.2044-1460574517.2069
Output for 5.4.20
-1460574517.5301-1460574517.5316-1460574517.5335-1460574517.535
Output for 5.4.19
-1460574517.9426-1460574517.9449-1460574517.9471-1460574517.9495
Output for 5.4.18
-1460574518.512-1460574518.5141-1460574518.5161-1460574518.5182
Output for 5.4.17
-1460574519.099-1460574519.1007-1460574519.1024-1460574519.1042
Output for 5.4.16
-1460574519.4805-1460574519.4829-1460574519.4851-1460574519.4875
Output for 5.4.15
-1460574520.1348-1460574520.137-1460574520.1392-1460574520.1414
Output for 5.4.14
-1460574520.3026-1460574520.3047-1460574520.3069-1460574520.3097
Output for 5.4.13
-1460574520.6944-1460574520.6968-1460574520.6991-1460574520.7015
Output for 5.4.12
-1460574521.1055-1460574521.1079-1460574521.1102-1460574521.1127
Output for 5.4.11
-1460574521.6694-1460574521.672-1460574521.6744-1460574521.677
Output for 5.4.10
-1460574522.0596-1460574522.0619-1460574522.0643-1460574522.0667
Output for 5.4.9
-1460574522.2328-1460574522.2351-1460574522.2371-1460574522.2391
Output for 5.4.8
-1460574522.787-1460574522.7893-1460574522.7915-1460574522.7939
Output for 5.4.7
-1460574523.1497-1460574523.1512-1460574523.1527-1460574523.1542
Output for 5.4.6
-1460574523.3053-1460574523.3069-1460574523.3086-1460574523.3102
Output for 5.4.5
-1460574523.8699-1460574523.872-1460574523.8739-1460574523.876
Output for 5.4.4
-1460574524.2146-1460574524.2162-1460574524.2177-1460574524.2193
Output for 5.4.3
-1460574524.3999-1460574524.4023-1460574524.4048-1460574524.4073
Output for 5.4.2
-1460574524.9072-1460574524.909-1460574524.9107-1460574524.9125
Output for 5.4.1
-1460574525.3683-1460574525.3707-1460574525.373-1460574525.3754
Output for 5.4.0
-1460574525.5645-1460574525.567-1460574525.5696-1460574525.5721
Output for 5.3.29
-1460574512.8652-1460574512.867-1460574512.8688-1460574512.8709
Output for 5.3.28
-1460574516.6078-1460574516.6104-1460574516.6129-1460574516.6159
Output for 5.3.27
-1460574518.9043-1460574518.9072-1460574518.91-1460574518.913
Output for 5.3.26
-1460574519.6847-1460574519.6875-1460574519.6902-1460574519.6932
Output for 5.3.25
-1460574519.9442-1460574519.9466-1460574519.9492-1460574519.952
Output for 5.3.24
-1460574520.4983-1460574520.501-1460574520.5037-1460574520.5066
Output for 5.3.23
-1460574520.9128-1460574520.9152-1460574520.9176-1460574520.9203
Output for 5.3.22
-1460574521.2687-1460574521.2707-1460574521.2726-1460574521.2747
Output for 5.3.21
-1460574521.4728-1460574521.4755-1460574521.4785-1460574521.4814
Output for 5.3.20
-1460574521.8701-1460574521.8722-1460574521.8743-1460574521.8765
Output for 5.3.19
-1460574522.3995-1460574522.4017-1460574522.4037-1460574522.406
Output for 5.3.18
-1460574522.5956-1460574522.5983-1460574522.6016-1460574522.6044
Output for 5.3.17
-1460574522.9845-1460574522.9872-1460574522.9898-1460574522.9926
Output for 5.3.16
-1460574523.4971-1460574523.4999-1460574523.5027-1460574523.5057
Output for 5.3.15
-1460574523.6908-1460574523.6935-1460574523.6962-1460574523.6991
Output for 5.3.14
-1460574524.0539-1460574524.0563-1460574524.0587-1460574524.0612
Output for 5.3.13
-1460574524.574-1460574524.5762-1460574524.5783-1460574524.5806
Output for 5.3.12
-1460574524.7442-1460574524.7462-1460574524.7483-1460574524.7506
Output for 5.3.11
-1460574525.1769-1460574525.1798-1460574525.1829-1460574525.1861
Output for 5.3.10
-1460574525.7577-1460574525.7604-1460574525.7632-1460574525.7662
Output for 5.3.9
-1460574525.9416-1460574525.9442-1460574525.9468-1460574525.9497
Output for 5.3.8
-1460574526.2096-1460574526.2123-1460574526.215-1460574526.2181
Output for 5.3.7
-1460574526.4034-1460574526.4061-1460574526.4087-1460574526.4116
Output for 5.3.6
-1460574526.562-1460574526.5636-1460574526.5653-1460574526.5672
Output for 5.3.5
-1460574526.7549-1460574526.7577-1460574526.7605-1460574526.7634
Output for 5.3.4
-1460574527.369-1460574527.3712-1460574527.3733-1460574527.3756
Output for 5.3.3
-1460574527.7517-1460574527.7545-1460574527.7572-1460574527.7604
Output for 5.3.2
-1460574528.138-1460574528.1407-1460574528.1435-1460574528.1466
Output for 5.3.1
-1460574528.7494-1460574528.7522-1460574528.7551-1460574528.7582
Output for 5.3.0
-1460574529.107-1460574529.1097-1460574529.1125-1460574529.1153
Output for 5.2.17
-1460574526.9968-1460574526.9999-1460574527.003-1460574527.0062
Output for 5.2.16
-1460574527.1854-1460574527.1887-1460574527.1918-1460574527.195
Output for 5.2.15
-1460574527.5531-1460574527.5564-1460574527.5594-1460574527.5627
Output for 5.2.14
-1460574527.938-1460574527.9413-1460574527.9444-1460574527.9477
Output for 5.2.13
-1460574528.3749-1460574528.3781-1460574528.3814-1460574528.3848
Output for 5.2.12
-1460574528.5592-1460574528.5625-1460574528.5656-1460574528.5689
Output for 5.2.11
-1460574528.9163-1460574528.919-1460574528.9216-1460574528.9242
Output for 5.2.10
-1460574529.2886-1460574529.2919-1460574529.295-1460574529.2983
Output for 5.2.9
-1460574529.4728-1460574529.4759-1460574529.4789-1460574529.4819
Output for 5.2.8
-1460574529.6499-1460574529.6525-1460574529.6552-1460574529.658
Output for 5.2.7
-1460574529.8225-1460574529.8252-1460574529.8278-1460574529.8305
Output for 5.2.6
-1460574530.1585-1460574530.1617-1460574530.1647-1460574530.1678
Output for 5.2.5
-1460574530.4903-1460574530.4935-1460574530.4966-1460574530.4998
Output for 5.2.4
-1460574530.6731-1460574530.6764-1460574530.6799-1460574530.6832
Output for 5.2.3
-1460574530.8364-1460574530.839-1460574530.8414-1460574530.8441
Output for 5.2.2
-1460574531.0141-1460574531.0168-1460574531.0196-1460574531.0225
Output for 5.2.1
-1460574531.5928-1460574531.5947-1460574531.5966-1460574531.5985
Output for 5.2.0
-1460574531.7678-1460574531.7713-1460574531.7746-1460574531.7778
Output for 5.1.6
-1460574531.9416-1460574531.9449-1460574531.9481-1460574531.9513
Output for 5.1.5
-1460574532.2734-1460574532.2753-1460574532.2772-1460574532.279
Output for 5.1.4
-1460574532.6327-1460574532.6361-1460574532.6395-1460574532.643
Output for 5.1.3
-1460574532.8023-1460574532.8052-1460574532.8082-1460574532.8113
Output for 5.1.2
-1460574532.9475-1460574532.9493-1460574532.951-1460574532.9528
Output for 5.1.1
-1460574533.3402-1460574533.3435-1460574533.3468-1460574533.3498
Output for 5.1.0
-1460574533.5003-1460574533.5026-1460574533.5049-1460574533.507
Output for 5.0.5
-1460574533.828-1460574533.8337-1460574533.8392-1460574533.8447
Output for 5.0.4
-1460574534.2146-1460574534.2176-1460574534.2208-1460574534.2238
Output for 5.0.3
-1460574534.5335-1460574534.5374-1460574534.5413-1460574534.5455
Output for 5.0.2
-1460574534.8853-1460574534.8896-1460574534.8938-1460574534.898
Output for 5.0.1
-1460574535.2125-1460574535.2158-1460574535.219-1460574535.2221
Output for 5.0.0
-1460574535.401-1460574535.4063-1460574535.4117-1460574535.4164
Output for 4.4.9
-0.972383-0.97798-0.983396-0.988697
Output for 4.4.8
-0.30484-0.309633-0.314657-0.319337
Output for 4.4.7
-0.147485-0.150454-0.153388-0.156411
Output for 4.4.6
-0.287766-0.291723-0.295622-0.299327
Output for 4.4.5
-0.439831-0.443688-0.447343-0.451033
Output for 4.4.4
-0.117688-0.12201-0.126387-0.130638
Output for 4.4.3
-0.461704-0.464433-0.467158-0.469945
Output for 4.4.2
-0.092818-0.098272-0.103975-0.109702
Output for 4.4.1
-0.652223-0.657805-0.663127-0.668449
Output for 4.4.0
-0.070335-0.075448-0.080491-0.085433
Output for 4.3.11
-0.368311-0.372102-0.375855-0.37948
Output for 4.3.10
-0.68553-0.691026-0.696382-0.70154
Output for 4.3.9
-0.047856-0.053751-0.059558-0.065018
Output for 4.3.8
-0.557786-0.561274-0.564931-0.568244
Output for 4.3.7
-0.768373-0.771694-0.774743-0.777705
Output for 4.3.6
-0.914669-0.9192-0.923525-0.927716
Output for 4.3.5
-0.067796-0.072634-0.077413-0.081817
Output for 4.3.4
-0.240999-0.246007-0.250802-0.255241
Output for 4.3.3
-0.380476-0.385694-0.389724-0.393304
Output for 4.3.2
-0.630491-0.636295-0.641801-0.646959
Output for 4.3.1
-0.792352-0.798098-0.803648-0.808726
Output for 4.3.0
-0.952315-0.957438-0.962331-0.967013