3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $input = '1|27|31|33'; $separator = '##|##'; $time = microtime(true); var_dump($time); for ($i = 0; $i < 100000; $i++) { $result = str_replace('|', $separator, $input); } $time = microtime(true); var_dump($time); for ($i = 0; $i < 100000; $i++) { $result = ''; $it = new CachingIterator(new ArrayIterator(explode('|', $input)), CachingIterator::FULL_CACHE); foreach ($it as $categoryId) { $result .= $categoryId; if ($it->hasNext()) { $result .= $separator; } } } $time = microtime(true); var_dump($time);
Output for 7.1.0
float(1382714071.0062) float(1382714071.0241) float(1382714070.8545)
Output for 7.0.14
float(1382714071.0039) float(1382714071.0258) float(1382714070.8926)
Output for 7.0.7
float(1382721271.003) float(1382721271.0148) float(1382721271.213)
Output for 7.0.6
float(1382721271.0028) float(1382721271.0135) float(1382721271.2172)
Output for 7.0.5
float(1382721271.0034) float(1382721271.0168) float(1382721271.225)
Output for 7.0.4
float(1382721271.0041) float(1382721271.0207) float(1382721271.2486)
Output for 7.0.3
float(1382721271.0025) float(1382721271.0127) float(1382721271.1828)
Output for 7.0.2
float(1382721271.0025) float(1382721271.0129) float(1382721271.218)
Output for 7.0.1
float(1382721271.0025) float(1382721271.0132) float(1382721271.2319)
Output for 7.0.0
float(1382721271.004) float(1382721271.021) float(1382721271.2509)
Output for hhvm-3.12.0
float(1382721271.1456) float(1382721271.1636) float(1382721273.0222)
Output for hhvm-3.10.0
float(1382721271.1153) float(1382721271.1358) float(1382721273.4645)
Output for 5.6.28
float(1382714071.0046) float(1382714071.0456) float(1382714071.4242)
Output for 5.6.22
float(1382721271.0046) float(1382721271.0417) float(1382721271.3962)
Output for 5.6.21
float(1382721271.004) float(1382721271.0356) float(1382721271.3764)
Output for 5.6.20
float(1382721271.005) float(1382721271.0437) float(1382721271.4049)
Output for 5.6.19
float(1382721271.005) float(1382721271.0446) float(1382721271.4041)
Output for 5.6.18
float(1382721271.0046) float(1382721271.0401) float(1382721271.3841)
Output for 5.6.17
float(1382721271.004) float(1382721271.0305) float(1382721271.359)
Output for 5.6.16
float(1382721271.0045) float(1382721271.0347) float(1382721271.3736)
Output for 5.6.15
float(1382721271.0028) float(1382721271.0266) float(1382721271.3548)
Output for 5.6.14
float(1382721271.0043) float(1382721271.0344) float(1382721271.3786)
Output for 5.6.13
float(1382721271.0029) float(1382721271.0267) float(1382721271.3557)
Output for 5.6.12
float(1382721271.0034) float(1382721271.0296) float(1382721271.3612)
Output for 5.6.11
float(1382721271.0029) float(1382721271.0311) float(1382721271.3592)
Output for 5.6.10
float(1382721271.0041) float(1382721271.0383) float(1382721271.3637)
Output for 5.6.9
float(1382721271.0024) float(1382721271.0219) float(1382721271.299)
Output for 5.6.8
float(1382721271.0039) float(1382721271.0324) float(1382721271.3681)
Output for 5.6.7
float(1382721271.0044) float(1382721271.037) float(1382721271.3954)
Output for 5.6.6
float(1382721271.0047) float(1382721271.0431) float(1382721271.3918)
Output for 5.6.5
float(1382721271.0042) float(1382721271.039) float(1382721271.3756)
Output for 5.6.4
float(1382721271.0031) float(1382721271.0284) float(1382721271.3602)
Output for 5.6.3
float(1382721271.0042) float(1382721271.0344) float(1382721271.4384)
Output for 5.6.2
float(1382721271.0032) float(1382721271.0313) float(1382721271.3315)
Output for 5.6.1
float(1382721271.0042) float(1382721271.0386) float(1382721271.38)
Output for 5.6.0
float(1382721271.0044) float(1382721271.0373) float(1382721271.3737)
Output for 5.5.36
float(1382721271.0042) float(1382721271.0404) float(1382721271.3962)
Output for 5.5.35
float(1382721271.0037) float(1382721271.0349) float(1382721271.3655)
Output for 5.5.34
float(1382721271.005) float(1382721271.0456) float(1382721271.4072)
Output for 5.5.33
float(1382721271.0042) float(1382721271.0386) float(1382721271.3747)
Output for 5.5.32
float(1382721271.0041) float(1382721271.0357) float(1382721271.3728)
Output for 5.5.31
float(1382721271.0038) float(1382721271.0338) float(1382721271.3868)
Output for 5.5.30
float(1382721271.0037) float(1382721271.0383) float(1382721271.3933)
Output for 5.5.29
float(1382721271.0027) float(1382721271.028) float(1382721271.3514)
Output for 5.5.28
float(1382721271.004) float(1382721271.0385) float(1382721271.4024)
Output for 5.5.27
float(1382721271.0046) float(1382721271.0422) float(1382721271.3935)
Output for 5.5.26
float(1382721271.0028) float(1382721271.028) float(1382721271.3274)
Output for 5.5.25
float(1382721271.0027) float(1382721271.0274) float(1382721271.3061)
Output for 5.5.24
float(1382721271.0048) float(1382721271.0662) float(1382721271.4064)
Output for 5.5.23
float(1382721271.0046) float(1382721271.0412) float(1382721271.3839)
Output for 5.5.22
float(1382721271.0043) float(1382721271.0386) float(1382721271.3844)
Output for 5.5.21
float(1382721271.0045) float(1382721271.0394) float(1382721271.3728)
Output for 5.5.20
float(1382721271.0045) float(1382721271.0408) float(1382721271.3799)
Output for 5.5.19
float(1382721271.0037) float(1382721271.0354) float(1382721271.3681)
Output for 5.5.18
float(1382721271.0039) float(1382721271.0367) float(1382721271.3663)
Output for 5.5.16
float(1382721271.0029) float(1382721271.0282) float(1382721271.3502)
Output for 5.5.15
float(1382721271.0045) float(1382721271.039) float(1382721271.3819)
Output for 5.5.14
float(1382721271.0034) float(1382721271.0333) float(1382721271.3912)
Output for 5.5.13
float(1382721271.0048) float(1382721271.0414) float(1382721271.3859)
Output for 5.5.12
float(1382721271.0048) float(1382721271.0438) float(1382721271.4032)
Output for 5.5.11
float(1382721271.0032) float(1382721271.0301) float(1382721271.3705)
Output for 5.5.10
float(1382721271.0048) float(1382721271.0436) float(1382721271.381)
Output for 5.5.9
float(1382721271.0043) float(1382721271.0392) float(1382721271.3789)
Output for 5.5.8
float(1382721271.0045) float(1382721271.0406) float(1382721271.3823)
Output for 5.5.7
float(1382721271.0044) float(1382721271.0402) float(1382721271.3869)
Output for 5.5.6
float(1382721271.0043) float(1382721271.0406) float(1382721271.3783)
Output for 5.5.5
float(1382721271.003) float(1382721271.0289) float(1382721271.3535)
Output for 5.5.4
float(1382721271.004) float(1382721271.0338) float(1382721271.3565)
Output for 5.5.3
float(1382721271.0047) float(1382721271.0396) float(1382721271.3694)
Output for 5.5.2
float(1382721271.0039) float(1382721271.036) float(1382721271.3684)
Output for 5.5.1
float(1382721271.0035) float(1382721271.0339) float(1382721271.3594)
Output for 5.5.0
float(1382721271.0029) float(1382721271.0271) float(1382721271.3507)
Output for 5.4.45
float(1382721271.002) float(1382721271.021) float(1382721271.2802)
Output for 5.4.44
float(1382721271.0037) float(1382721271.0373) float(1382721271.3679)
Output for 5.4.43
float(1382721271.0036) float(1382721271.0354) float(1382721271.3893)
Output for 5.4.42
float(1382721271.0025) float(1382721271.0258) float(1382721271.3449)
Output for 5.4.41
float(1382721271.0029) float(1382721271.0315) float(1382721271.3649)
Output for 5.4.40
float(1382721271.0029) float(1382721271.0271) float(1382721271.3454)
Output for 5.4.39
float(1382721271.0041) float(1382721271.042) float(1382721271.3838)
Output for 5.4.38
float(1382721271.0036) float(1382721271.0426) float(1382721271.3768)
Output for 5.4.37
float(1382721271.0034) float(1382721271.0339) float(1382721271.3591)
Output for 5.4.36
float(1382721271.0039) float(1382721271.0376) float(1382721271.3717)
Output for 5.4.35
float(1382721271.0041) float(1382721271.0375) float(1382721271.3545)
Output for 5.4.34
float(1382721271.0026) float(1382721271.0278) float(1382721271.3233)
Output for 5.4.32
float(1382721271.004) float(1382721271.0442) float(1382721271.4159)
Output for 5.4.31
float(1382721271.0041) float(1382721271.0396) float(1382721271.3714)
Output for 5.4.30
float(1382721271.0032) float(1382721271.0323) float(1382721271.3735)
Output for 5.4.29
float(1382721271.0025) float(1382721271.0264) float(1382721271.3469)
Output for 5.4.28
float(1382721271.0034) float(1382721271.0355) float(1382721271.3676)
Output for 5.4.27
float(1382721271.0031) float(1382721271.0309) float(1382721271.3536)
Output for 5.4.26
float(1382721271.0041) float(1382721271.0392) float(1382721271.3808)
Output for 5.4.25
float(1382721271.0039) float(1382721271.0399) float(1382721271.3755)
Output for 5.4.24
float(1382721271.0039) float(1382721271.0379) float(1382721271.3675)
Output for 5.4.23
float(1382721271.0034) float(1382721271.0357) float(1382721271.3677)
Output for 5.4.22
float(1382721271.0025) float(1382721271.0263) float(1382721271.3436)
Output for 5.4.21
float(1382721271.004) float(1382721271.0413) float(1382721271.3875)
Output for 5.4.20
float(1382721271.004) float(1382721271.04) float(1382721271.4073)
Output for 5.4.19
float(1382721271.0041) float(1382721271.0412) float(1382721271.39)
Output for 5.4.18
float(1382721271.0025) float(1382721271.0258) float(1382721271.3209)
Output for 5.4.17
float(1382721271.003) float(1382721271.0311) float(1382721271.369)
Output for 5.4.16
float(1382721271.0035) float(1382721271.0277) float(1382721271.3572)
Output for 5.4.15
float(1382721271.0039) float(1382721271.0396) float(1382721271.3647)
Output for 5.4.14
float(1382721271.0019) float(1382721271.0376) float(1382721271.3784)
Output for 5.4.13
float(1382721271.0015) float(1382721271.0255) float(1382721271.3531)
Output for 5.4.12
float(1382721271.0022) float(1382721271.0383) float(1382721271.3783)
Output for 5.4.11
float(1382721271.0014) float(1382721271.0256) float(1382721271.3479)
Output for 5.4.10
float(1382721271.0023) float(1382721271.0359) float(1382721271.3619)
Output for 5.4.9
float(1382721271.0021) float(1382721271.0383) float(1382721271.3712)
Output for 5.4.8
float(1382721271.003) float(1382721271.044) float(1382721271.393)
Output for 5.4.7
float(1382721271.0021) float(1382721271.0375) float(1382721271.3719)
Output for 5.4.6
float(1382721271.0019) float(1382721271.0321) float(1382721271.3757)
Output for 5.4.5
float(1382721271.0024) float(1382721271.0373) float(1382721271.36)
Output for 5.4.4
float(1382721271.0023) float(1382721271.037) float(1382721271.3561)
Output for 5.4.3
float(1382721271.0015) float(1382721271.0275) float(1382721271.3443)
Output for 5.4.2
float(1382721271.0014) float(1382721271.0249) float(1382721271.3263)
Output for 5.4.1
float(1382721271.0011) float(1382721271.0217) float(1382721271.2821)
Output for 5.4.0
float(1382721271.0015) float(1382721271.0281) float(1382721271.3546)
Output for 5.3.29
float(1382721271.0021) float(1382721271.0437) float(1382721271.4311)
Output for 5.3.28
float(1382721271.0024) float(1382721271.0508) float(1382721271.4864)
Output for 5.3.27
float(1382721271.0014) float(1382721271.0595) float(1382721271.4568)
Output for 5.3.26
float(1382721271.002) float(1382721271.0457) float(1382721271.4404)
Output for 5.3.25
float(1382721271.0022) float(1382721271.045) float(1382721271.4422)
Output for 5.3.24
float(1382721271.0026) float(1382721271.0459) float(1382721271.4587)
Output for 5.3.23
float(1382721271.0034) float(1382721271.0484) float(1382721271.4589)
Output for 5.3.22
float(1382721271.0019) float(1382721271.0423) float(1382721271.4423)
Output for 5.3.21
float(1382721271.0019) float(1382721271.0403) float(1382721271.4278)
Output for 5.3.20
float(1382721271.002) float(1382721271.0562) float(1382721271.4481)
Output for 5.3.19
float(1382721271.0022) float(1382721271.0475) float(1382721271.4501)
Output for 5.3.18
float(1382721271.0023) float(1382721271.0412) float(1382721271.4331)
Output for 5.3.17
float(1382721271.0021) float(1382721271.0409) float(1382721271.4279)
Output for 5.3.16
float(1382721271.0024) float(1382721271.0469) float(1382721271.4321)
Output for 5.3.15
float(1382721271.0016) float(1382721271.0357) float(1382721271.4247)
Output for 5.3.14
float(1382721271.002) float(1382721271.0411) float(1382721271.4574)
Output for 5.3.13
float(1382721271.0027) float(1382721271.0506) float(1382721271.4808)
Output for 5.3.12
float(1382721271.0059) float(1382721271.0554) float(1382721271.4679)
Output for 5.3.11
float(1382721271.0013) float(1382721271.031) float(1382721271.3989)
Output for 5.3.10
float(1382721271.0015) float(1382721271.0368) float(1382721271.4188)
Output for 5.3.9
float(1382721271.0013) float(1382721271.0308) float(1382721271.3661)
Output for 5.3.8
float(1382721271.0014) float(1382721271.0326) float(1382721271.3892)
Output for 5.3.7
float(1382721271.0013) float(1382721271.0308) float(1382721271.3701)
Output for 5.3.6
float(1382721271.0011) float(1382721271.0256) float(1382721271.3482)
Output for 5.3.5
float(1382721271.0012) float(1382721271.0283) float(1382721271.3606)
Output for 5.3.4
float(1382721271.0017) float(1382721271.0337) float(1382721271.4265)
Output for 5.3.3
float(1382721271.0016) float(1382721271.0378) float(1382721271.3518)
Output for 5.3.2
float(1382721271.0025) float(1382721271.0494) float(1382721271.4339)
Output for 5.3.1
float(1382721271.0022) float(1382721271.0477) float(1382721271.434)
Output for 5.3.0
float(1382721271.0021) float(1382721271.0448) float(1382721271.4233)
Output for 5.2.17
float(1382721271.0013) float(1382721271.0366) float(1382721271.3942)
Output for 5.2.16
float(1382721271.0019) float(1382721271.0461) float(1382721271.4092)
Output for 5.2.15
float(1382721271.0012) float(1382721271.0388) float(1382721271.388)
Output for 5.2.14
float(1382721271.0017) float(1382721271.0469) float(1382721271.4357)
Output for 5.2.13
float(1382721271.002) float(1382721271.0527) float(1382721271.4476)
Output for 5.2.12
float(1382721271.0012) float(1382721271.0315) float(1382721271.3987)
Output for 5.2.11
float(1382721271.0018) float(1382721271.0513) float(1382721271.4273)
Output for 5.2.10
float(1382721271.002) float(1382721271.0539) float(1382721271.4349)
Output for 5.2.9
float(1382721271.0017) float(1382721271.0506) float(1382721271.4341)
Output for 5.2.8
float(1382721271.0018) float(1382721271.0425) float(1382721271.4094)
Output for 5.2.7
float(1382721271.0019) float(1382721271.0519) float(1382721271.4353)
Output for 5.2.6
float(1382721271.0019) float(1382721271.0515) float(1382721271.4361)
Output for 5.2.5
float(1382721271.0018) float(1382721271.0472) float(1382721271.4156)
Output for 5.2.4
float(1382721271.0022) float(1382721271.0545) float(1382721271.4755)
Output for 5.2.3
float(1382721271.0017) float(1382721271.042) float(1382721271.4335)
Output for 5.2.2
float(1382721271.002) float(1382721271.0519) float(1382721271.4374)
Output for 5.2.1
float(1382721271.002) float(1382721271.0541) float(1382721271.4331)
Output for 5.2.0
float(1382721271.0017) float(1382721271.0438) float(1382721271.4178)
Output for 5.1.6
float(1382721271.0019) float(1382721271.0469) Fatal error: Undefined class constant 'FULL_CACHE' in /in/DnIVL on line 15
Process exited with code 255.
Output for 5.1.5
float(1382721271.0019) float(1382721271.0461) Fatal error: Undefined class constant 'FULL_CACHE' in /in/DnIVL on line 15
Process exited with code 255.
Output for 5.1.4
float(1382721271.0013) float(1382721271.0373) Fatal error: Undefined class constant 'FULL_CACHE' in /in/DnIVL on line 15
Process exited with code 255.
Output for 5.1.3
float(1382721271.0019) float(1382721271.0482) Fatal error: Undefined class constant 'FULL_CACHE' in /in/DnIVL on line 15
Process exited with code 255.
Output for 5.1.2
float(1382721271.0018) float(1382721271.0423) Fatal error: Undefined class constant 'FULL_CACHE' in /in/DnIVL on line 15
Process exited with code 255.
Output for 5.1.1
float(1382721271.0014) float(1382721271.0417) Fatal error: Undefined class constant 'FULL_CACHE' in /in/DnIVL on line 15
Process exited with code 255.
Output for 5.1.0
float(1382721271.0018) float(1382721271.0499) Fatal error: Undefined class constant 'FULL_CACHE' in /in/DnIVL on line 15
Process exited with code 255.
Output for 5.0.5
float(1382721271.0005) float(1382721271.0521) Fatal error: Undefined class constant 'FULL_CACHE' in /in/DnIVL on line 15 Fatal error: Unknown: The inner constructor wasn't initialized with an iterator instance in Unknown on line 0
Process exited with code 255.
Output for 5.0.4
float(1382721271.0005) float(1382721271.0449) Fatal error: Undefined class constant 'FULL_CACHE' in /in/DnIVL on line 15 Fatal error: Unknown: The inner constructor wasn't initialized with an iterator instance in Unknown on line 0
Process exited with code 255.
Output for 5.0.3
float(1382721271.0006) float(1382721271.0544) Fatal error: Undefined class constant 'FULL_CACHE' in /in/DnIVL on line 15 Fatal error: Unknown: The inner constructor wasn't initialized with an iterator instance in Unknown on line 0
Process exited with code 255.
Output for 5.0.2
float(1382721271.0008) float(1382721271.0722) Fatal error: Undefined class constant 'FULL_CACHE' in /in/DnIVL on line 15 Fatal error: Unknown: The inner constructor wasn't initialized with an iterator instance in Unknown on line 0
Process exited with code 255.
Output for 5.0.1
float(1382721271.0007) float(1382721271.0655) Fatal error: Undefined class constant 'FULL_CACHE' in /in/DnIVL on line 15 Fatal error: Unknown: The inner constructor wasn't initialized with an iterator instance in Unknown on line 0
Process exited with code 255.
Output for 5.0.0
float(1382721271.0007) float(1382721271.0704) Fatal error: Undefined class constant 'FULL_CACHE' in /in/DnIVL on line 15
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ')', expecting '(' in /in/DnIVL on line 15
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected ')', expecting '(' in /in/DnIVL on line 15
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/DnIVL on line 15
Process exited with code 255.