3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo preg_replace("/.|foo/e\0bar/i", 'rand()', 'foo');
Output for 5.4.7 - 5.6.28, 7.0.0 - 7.1.0
Warning: preg_replace(): Null byte in regex in /in/eEdrP on line 3
Output for hhvm-3.12.0
Fatal error: Uncaught Error: Error: Null byte found in pattern in /in/eEdrP:3 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.0
Fatal error: Error: Null byte found in pattern in /in/eEdrP on line 3
Process exited with code 255.
Output for 5.4.6
518260148692478851409278613
Output for 5.4.5
138899565310766337151858972107
Output for 5.4.4
864738511855482235174462926
Output for 5.4.3
18077301442792072601794617787
Output for 5.4.2
78456418816982011331498333741
Output for 5.4.1
171089250710607818551010694538
Output for 5.4.0
967717977214353111282720201
Output for 5.3.29
170842468010638567771653173922
Output for 5.3.28
203345011714306307472003001866
Output for 5.3.27
89984942619236759707029098
Output for 5.3.26
143734748619788010101738293810
Output for 5.3.25
10580884771880810136402174370
Output for 5.3.24
17906623857097588671311860043
Output for 5.3.23
16700461421576796779950266008
Output for 5.3.22
1981880040659567411966953060
Output for 5.3.21
11401471411055292398914138510
Output for 5.3.20
11793779851897855499324270420
Output for 5.3.19
109462890217626915241104061519
Output for 5.3.18
26878766714173405881633083554
Output for 5.3.17
21462248759136878901881246759
Output for 5.3.16
193251744613665620661995497837
Output for 5.3.15
5551627141699204882036755684
Output for 5.3.14
78189356580419669352891279
Output for 5.3.13
7086900991119604415235589314
Output for 5.3.12
16225302278782199871971310517
Output for 5.3.11
18886431432020116351371279219
Output for 5.3.10
15804800545415802121598019372
Output for 5.3.9
200562697416528544011597141993
Output for 5.3.8
2024612108458306009306363540
Output for 5.3.7
3678424708102318671671872118
Output for 5.3.6
70470949356861678038458958
Output for 5.3.5
9114463802120919378348138023
Output for 5.3.4
1040512733102553860446412851
Output for 5.3.3
1720396328171537937521930324
Output for 5.3.2
181426635219380552781170768943
Output for 5.3.1
784323223129839930963484886
Output for 5.3.0
158725061213542704241444678432
Output for 5.2.17
91130041722770143076531740
Output for 5.2.16
1029995115726867947158248369
Output for 5.2.15
533775963224263741463893071
Output for 5.2.14
969658985907338598214377047
Output for 5.2.13
1676680701195412866115103420
Output for 5.2.12
102568230710599634842114949659
Output for 5.2.11
6975205601203369164773903703
Output for 5.2.10
459660392495844661990047392
Output for 5.2.9
101941040115810151571959439752
Output for 5.2.8
2287048651586139880671265638
Output for 5.2.7
18195510781532411513826438360
Output for 5.2.6
52982773420903862401670937059
Output for 5.2.5
172004837511106958941789058903
Output for 5.2.4
3695515838774443461642228164
Output for 5.2.3
3122733361223906611193261258
Output for 5.2.2
164415007214867659841701927218
Output for 5.2.1
184095287916180713851289319647
Output for 5.2.0
1797866093151688670917389121
Output for 5.1.6
206185494618206401041556949662
Output for 5.1.5
93487561110808771591948099832
Output for 5.1.4
1379444358993207120548443386
Output for 5.1.3
1303698860388943240953558584
Output for 5.1.2
193789621815161591271888029978
Output for 5.1.1
78735118717347440171616166372
Output for 5.1.0
392990869859983118583210447
Output for 5.0.5
811965817590444789302252629
Output for 5.0.4
19415991831651158759893191460
Output for 5.0.3
144294999320981512201396830145
Output for 5.0.2
52384570129300425193399961
Output for 5.0.1
2372114609536427111871854550
Output for 5.0.0
18282051011343043410167207582
Output for 4.4.9
55241091316060492481243614419
Output for 4.4.8
14502141491214088201791481431
Output for 4.4.7
18021907272325531298333412
Output for 4.4.6
534186585625739231092905492
Output for 4.4.5
6215554811078958158570757189
Output for 4.4.4
1265274547973654681770335405
Output for 4.4.3
194686672324480181654055113
Output for 4.4.2
1902958940123370652405112741
Output for 4.4.1
1022075080758672176767732545
Output for 4.4.0
2771076077001377381517605206
Output for 4.3.11
1516648663680999550283941517
Output for 4.3.10
14777778201400847835903924171
Output for 4.3.9
87388219818799729861695114989
Output for 4.3.8
21458806854363693261714639989
Output for 4.3.7
3797210320926491131796427063
Output for 4.3.6
11091107531682475132126840715
Output for 4.3.5
184162952315691788811814136381
Output for 4.3.4
15683902367101126041040988664
Output for 4.3.3
2076807977411202685630096733
Output for 4.3.2
893143401030086051267797431
Output for 4.3.1
104048850720568364131112889237
Output for 4.3.0
859836311332217016856556820