1--TEST--
2substr_replace() function
3--FILE--
4<?php
5$str = "try this";
6$repl = "bala ";
7$start = 2;
8echo "\n";
9
10
11echo "substr_replace('$str', '$repl', $start)\n";
12var_dump(substr_replace($str, $repl, $start));
13echo "\n";
14
15$len = 3;
16echo "substr_replace('$str', '$repl', $start, $len)\n";
17var_dump(substr_replace($str, $repl, $start, $len));
18echo "\n";
19
20$len = 0;
21echo "substr_replace('$str', '$repl', $start, $len)\n";
22var_dump(substr_replace($str, $repl, $start, $len));
23echo "\n";
24
25$len = -2;
26echo "substr_replace('$str', '$repl', $start, $len)\n";
27var_dump(substr_replace($str, $repl, $start, $len));
28echo "\n";
29echo "\n";
30echo "\n";
31
32
33$str = "try this";
34$repl = array("bala ");
35$start = 4;
36$len = 3;
37echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).", ".var_export($start,1)."")."\n";
38var_dump(substr_replace($str, $repl, $start))."\n";
39echo "\n";
40echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).", ".var_export($start,1)."")."\n";
41var_dump(substr_replace($str, $repl, $start, $len))."\n";
42echo "\n";
43
44echo "\n";
45echo "\n";
46echo "\n";
47
48
49
50$str = array("ala portokala");
51$repl = array("bala ");
52$start = array(4);
53$len = array(3);
54echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).", ".var_export($start,1)."")."\n";
55var_dump(substr_replace($str, $repl, $start))."\n";
56echo "\n";
57
58$len = array(3);
59echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).", ".var_export($start,1).", ".var_export($len,1).")")."\n";
60var_dump(substr_replace($str, $repl, $start, $len))."\n";
61echo "\n";
62
63$len = array(0);
64echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).", ".var_export($start,1).", ".var_export($len,1).")")."\n";
65var_dump(substr_replace($str, $repl, $start, $len))."\n";
66echo "\n";
67
68$len = array(-2);
69echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).", ".var_export($start,1).", ".var_export($len,1).")")."\n";
70var_dump(substr_replace($str, $repl, $start, $len))."\n";
71echo "\n";
72echo "\n";
73echo "\n";
74
75
76
77
78$str = array("ala portokala");
79$repl = "bala ";
80$start = 4;
81$len = 3;
82echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).")")."\n";
83var_dump(substr_replace($str, $repl, $start))."\n";
84echo "\n";
85echo "\n";
86
87
88
89$str = array("ala portokala", "try this");
90$repl = array("bala ");
91$start = 4;
92$len = 3;
93echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
94var_dump(substr_replace($str, $repl, $start, $len))."\n";
95echo "\n";
96echo "\n";
97
98
99$str = array("ala portokala", "try this");
100$repl = "bala ";
101$start = 4;
102$len = 3;
103echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
104var_dump(substr_replace($str, $repl, $start, $len))."\n";
105echo "\n";
106
107
108$str = array("ala portokala", "try this");
109$repl = array("bala ");
110$start = 4;
111$len = 0;
112echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
113var_dump(substr_replace($str, $repl, $start, $len))."\n";
114echo "\n";
115echo "\n";
116
117
118$str = array("ala portokala", "try this");
119$repl = "bala ";
120$start = 4;
121$len = 0;
122echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
123var_dump(substr_replace($str, $repl, $start, $len))."\n";
124echo "\n";
125
126$str = array("ala portokala", "try this");
127$repl = array("bala ");
128$start = 4;
129$len = -2;
130echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
131var_dump(substr_replace($str, $repl, $start, $len))."\n";
132echo "\n";
133echo "\n";
134
135
136$str = array("ala portokala", "try this");
137$repl = "bala ";
138$start = 4;
139$len = -2;
140echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
141var_dump(substr_replace($str, $repl, $start, $len))."\n";
142echo "\n";
143echo "\n";
144echo "\n";
145echo "\n";
146echo "\n";
147echo "\n";
148
149
150
151
152$str = array("ala portokala");
153$repl = "bala ";
154$start = array(4);
155$len = 3;
156echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).")")."\n";
157var_dump(substr_replace($str, $repl, $start))."\n";
158echo "\n";
159echo "\n";
160
161
162
163$str = array("ala portokala", "try this");
164$repl = array("bala ");
165$start = array(4);
166$len = 3;
167echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
168var_dump(substr_replace($str, $repl, $start, $len))."\n";
169echo "\n";
170echo "\n";
171
172
173$str = array("ala portokala", "try this");
174$repl = "bala ";
175$start = array(4);
176$len = 3;
177echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
178var_dump(substr_replace($str, $repl, $start, $len))."\n";
179echo "\n";
180
181
182$str = array("ala portokala", "try this");
183$repl = array("bala ");
184$start = array(4);
185$len = 0;
186echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
187var_dump(substr_replace($str, $repl, $start, $len))."\n";
188echo "\n";
189echo "\n";
190
191
192$str = array("ala portokala", "try this");
193$repl = "bala ";
194$start = array(4);
195$len = 0;
196echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
197var_dump(substr_replace($str, $repl, $start, $len))."\n";
198echo "\n";
199
200$str = array("ala portokala", "try this");
201$repl = array("bala ");
202$start = array(4);
203$len = -2;
204echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
205var_dump(substr_replace($str, $repl, $start, $len))."\n";
206echo "\n";
207echo "\n";
208
209
210$str = array("ala portokala", "try this");
211$repl = "bala ";
212$start = array(4);
213$len = -2;
214echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
215var_dump(substr_replace($str, $repl, $start, $len))."\n";
216echo "\n";
217
218
219echo "\n";
220echo "\n";
221echo "\n";
222echo "\n";
223echo "\n";
224echo "\n";
225
226
227$str = array("ala portokala");
228$repl = "bala ";
229$start = array(4,2);
230$len = 3;
231echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).")")."\n";
232var_dump(substr_replace($str, $repl, $start))."\n";
233echo "\n";
234echo "\n";
235
236
237
238$str = array("ala portokala", "try this");
239$repl = array("bala ");
240$start = array(4,2);
241$len = 3;
242echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
243var_dump(substr_replace($str, $repl, $start, $len))."\n";
244echo "\n";
245echo "\n";
246
247
248$str = array("ala portokala", "try this");
249$repl = "bala ";
250$start = array(4,2);
251$len = 3;
252echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
253var_dump(substr_replace($str, $repl, $start, $len))."\n";
254echo "\n";
255
256
257$str = array("ala portokala", "try this");
258$repl = array("bala ");
259$start = array(4,2);
260$len = 0;
261echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
262var_dump(substr_replace($str, $repl, $start, $len))."\n";
263echo "\n";
264echo "\n";
265
266
267$str = array("ala portokala", "try this");
268$repl = "bala ";
269$start = array(4,2);
270$len = 0;
271echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
272var_dump(substr_replace($str, $repl, $start, $len))."\n";
273echo "\n";
274
275$str = array("ala portokala", "try this");
276$repl = array("bala ");
277$start = array(4,2);
278$len = -2;
279echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
280var_dump(substr_replace($str, $repl, $start, $len))."\n";
281echo "\n";
282echo "\n";
283
284
285$str = array("ala portokala", "try this");
286$repl = "bala ";
287$start = array(4,2);
288$len = -2;
289echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
290var_dump(substr_replace($str, $repl, $start, $len))."\n";
291echo "\n";
292
293
294
295echo "\n";
296echo "\n";
297echo "\n";
298echo "\n";
299echo "\n";
300echo "\n";
301
302
303$str = array("ala portokala");
304$repl = "bala ";
305$start = array(4,2);
306$len = array(3);
307echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).")")."\n";
308var_dump(substr_replace($str, $repl, $start))."\n";
309echo "\n";
310echo "\n";
311
312
313
314$str = array("ala portokala", "try this");
315$repl = array("bala ");
316$start = array(4,2);
317$len = array(3);
318echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
319var_dump(substr_replace($str, $repl, $start, $len))."\n";
320echo "\n";
321echo "\n";
322
323
324$str = array("ala portokala", "try this");
325$repl = "bala ";
326$start = array(4,2);
327$len = array(3);
328echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
329var_dump(substr_replace($str, $repl, $start, $len))."\n";
330echo "\n";
331
332
333$str = array("ala portokala", "try this");
334$repl = array("bala ");
335$start = array(4,2);
336$len = array(0);
337echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
338var_dump(substr_replace($str, $repl, $start, $len))."\n";
339echo "\n";
340echo "\n";
341
342
343$str = array("ala portokala", "try this");
344$repl = "bala ";
345$start = array(4,2);
346$len = array(0);
347echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
348var_dump(substr_replace($str, $repl, $start, $len))."\n";
349echo "\n";
350
351$str = array("ala portokala", "try this");
352$repl = array("bala ");
353$start = array(4,2);
354$len = array(-2);
355echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
356var_dump(substr_replace($str, $repl, $start, $len))."\n";
357echo "\n";
358echo "\n";
359
360
361$str = array("ala portokala", "try this");
362$repl = "bala ";
363$start = array(4,2);
364$len = array(-2);
365echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
366var_dump(substr_replace($str, $repl, $start, $len))."\n";
367echo "\n";
368
369
370echo "\n";
371echo "\n";
372echo "\n";
373echo "\n";
374echo "\n";
375echo "\n";
376
377
378$str = array("ala portokala");
379$repl = "bala ";
380$start = array(4,2);
381$len = array(3,2);
382echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).")")."\n";
383var_dump(substr_replace($str, $repl, $start))."\n";
384echo "\n";
385echo "\n";
386
387
388
389$str = array("ala portokala", "try this");
390$repl = array("bala ");
391$start = array(4,2);
392$len = array(3,2);
393echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
394var_dump(substr_replace($str, $repl, $start, $len))."\n";
395echo "\n";
396echo "\n";
397
398
399$str = array("ala portokala", "try this");
400$repl = "bala ";
401$start = array(4,2);
402$len = array(3,2);
403echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
404var_dump(substr_replace($str, $repl, $start, $len))."\n";
405echo "\n";
406
407
408$str = array("ala portokala", "try this");
409$repl = array("bala ");
410$start = array(4,2);
411$len = array(0,0);
412echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
413var_dump(substr_replace($str, $repl, $start, $len))."\n";
414echo "\n";
415echo "\n";
416
417
418$str = array("ala portokala", "try this");
419$repl = "bala ";
420$start = array(4,2);
421$len = array(0,0);
422echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
423var_dump(substr_replace($str, $repl, $start, $len))."\n";
424echo "\n";
425
426$str = array("ala portokala", "try this");
427$repl = array("bala ");
428$start = array(4,2);
429$len = array(-2,-3);
430echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
431var_dump(substr_replace($str, $repl, $start, $len))."\n";
432echo "\n";
433echo "\n";
434
435
436$str = array("ala portokala", "try this");
437$repl = "bala ";
438$start = array(4,2);
439$len = array(-2,-3);
440echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n";
441var_dump(substr_replace($str, $repl, $start, $len))."\n";
442echo "\n";
443
444
445
446
447?>
448--EXPECT--
449substr_replace('try this', 'bala ', 2)
450string(7) "trbala "
451
452substr_replace('try this', 'bala ', 2, 3)
453string(10) "trbala his"
454
455substr_replace('try this', 'bala ', 2, 0)
456string(13) "trbala y this"
457
458substr_replace('try this', 'bala ', 2, -2)
459string(9) "trbala is"
460
461
462
463substr_replace('try this', array (  0 => 'bala ',), 4
464string(9) "try bala "
465
466substr_replace('try this', array (  0 => 'bala ',), 4
467string(10) "try bala s"
468
469
470
471
472substr_replace(array (  0 => 'ala portokala',), array (  0 => 'bala ',), array (  0 => 4,)
473array(1) {
474  [0]=>
475  string(9) "ala bala "
476}
477
478substr_replace(array (  0 => 'ala portokala',), array (  0 => 'bala ',), array (  0 => 4,), array (  0 => 3,))
479array(1) {
480  [0]=>
481  string(15) "ala bala tokala"
482}
483
484substr_replace(array (  0 => 'ala portokala',), array (  0 => 'bala ',), array (  0 => 4,), array (  0 => 0,))
485array(1) {
486  [0]=>
487  string(18) "ala bala portokala"
488}
489
490substr_replace(array (  0 => 'ala portokala',), array (  0 => 'bala ',), array (  0 => 4,), array (  0 => -2,))
491array(1) {
492  [0]=>
493  string(11) "ala bala la"
494}
495
496
497
498substr_replace(array (  0 => 'ala portokala',), 'bala ',4)
499array(1) {
500  [0]=>
501  string(9) "ala bala "
502}
503
504
505substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), array (  0 => 'bala ',),4, 3)
506array(2) {
507  [0]=>
508  string(15) "ala bala tokala"
509  [1]=>
510  string(5) "try s"
511}
512
513
514substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), 'bala ',4, 3)
515array(2) {
516  [0]=>
517  string(15) "ala bala tokala"
518  [1]=>
519  string(10) "try bala s"
520}
521
522substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), array (  0 => 'bala ',),4, 0)
523array(2) {
524  [0]=>
525  string(18) "ala bala portokala"
526  [1]=>
527  string(8) "try this"
528}
529
530
531substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), 'bala ',4, 0)
532array(2) {
533  [0]=>
534  string(18) "ala bala portokala"
535  [1]=>
536  string(13) "try bala this"
537}
538
539substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), array (  0 => 'bala ',),4, -2)
540array(2) {
541  [0]=>
542  string(11) "ala bala la"
543  [1]=>
544  string(6) "try is"
545}
546
547
548substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), 'bala ',4, -2)
549array(2) {
550  [0]=>
551  string(11) "ala bala la"
552  [1]=>
553  string(11) "try bala is"
554}
555
556
557
558
559
560
561substr_replace(array (  0 => 'ala portokala',), 'bala ',array (  0 => 4,))
562array(1) {
563  [0]=>
564  string(9) "ala bala "
565}
566
567
568substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), array (  0 => 'bala ',),array (  0 => 4,), 3)
569array(2) {
570  [0]=>
571  string(15) "ala bala tokala"
572  [1]=>
573  string(5) " this"
574}
575
576
577substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), 'bala ',array (  0 => 4,), 3)
578array(2) {
579  [0]=>
580  string(15) "ala bala tokala"
581  [1]=>
582  string(10) "bala  this"
583}
584
585substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), array (  0 => 'bala ',),array (  0 => 4,), 0)
586array(2) {
587  [0]=>
588  string(18) "ala bala portokala"
589  [1]=>
590  string(8) "try this"
591}
592
593
594substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), 'bala ',array (  0 => 4,), 0)
595array(2) {
596  [0]=>
597  string(18) "ala bala portokala"
598  [1]=>
599  string(13) "bala try this"
600}
601
602substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), array (  0 => 'bala ',),array (  0 => 4,), -2)
603array(2) {
604  [0]=>
605  string(11) "ala bala la"
606  [1]=>
607  string(2) "is"
608}
609
610
611substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), 'bala ',array (  0 => 4,), -2)
612array(2) {
613  [0]=>
614  string(11) "ala bala la"
615  [1]=>
616  string(7) "bala is"
617}
618
619
620
621
622
623
624
625substr_replace(array (  0 => 'ala portokala',), 'bala ',array (  0 => 4,  1 => 2,))
626array(1) {
627  [0]=>
628  string(9) "ala bala "
629}
630
631
632substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), array (  0 => 'bala ',),array (  0 => 4,  1 => 2,), 3)
633array(2) {
634  [0]=>
635  string(15) "ala bala tokala"
636  [1]=>
637  string(5) "trhis"
638}
639
640
641substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), 'bala ',array (  0 => 4,  1 => 2,), 3)
642array(2) {
643  [0]=>
644  string(15) "ala bala tokala"
645  [1]=>
646  string(10) "trbala his"
647}
648
649substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), array (  0 => 'bala ',),array (  0 => 4,  1 => 2,), 0)
650array(2) {
651  [0]=>
652  string(18) "ala bala portokala"
653  [1]=>
654  string(8) "try this"
655}
656
657
658substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), 'bala ',array (  0 => 4,  1 => 2,), 0)
659array(2) {
660  [0]=>
661  string(18) "ala bala portokala"
662  [1]=>
663  string(13) "trbala y this"
664}
665
666substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), array (  0 => 'bala ',),array (  0 => 4,  1 => 2,), -2)
667array(2) {
668  [0]=>
669  string(11) "ala bala la"
670  [1]=>
671  string(4) "tris"
672}
673
674
675substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), 'bala ',array (  0 => 4,  1 => 2,), -2)
676array(2) {
677  [0]=>
678  string(11) "ala bala la"
679  [1]=>
680  string(9) "trbala is"
681}
682
683
684
685
686
687
688
689substr_replace(array (  0 => 'ala portokala',), 'bala ',array (  0 => 4,  1 => 2,))
690array(1) {
691  [0]=>
692  string(9) "ala bala "
693}
694
695
696substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), array (  0 => 'bala ',),array (  0 => 4,  1 => 2,), array (  0 => 3,))
697array(2) {
698  [0]=>
699  string(15) "ala bala tokala"
700  [1]=>
701  string(2) "tr"
702}
703
704
705substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), 'bala ',array (  0 => 4,  1 => 2,), array (  0 => 3,))
706array(2) {
707  [0]=>
708  string(15) "ala bala tokala"
709  [1]=>
710  string(7) "trbala "
711}
712
713substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), array (  0 => 'bala ',),array (  0 => 4,  1 => 2,), array (  0 => 0,))
714array(2) {
715  [0]=>
716  string(18) "ala bala portokala"
717  [1]=>
718  string(2) "tr"
719}
720
721
722substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), 'bala ',array (  0 => 4,  1 => 2,), array (  0 => 0,))
723array(2) {
724  [0]=>
725  string(18) "ala bala portokala"
726  [1]=>
727  string(7) "trbala "
728}
729
730substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), array (  0 => 'bala ',),array (  0 => 4,  1 => 2,), array (  0 => -2,))
731array(2) {
732  [0]=>
733  string(11) "ala bala la"
734  [1]=>
735  string(2) "tr"
736}
737
738
739substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), 'bala ',array (  0 => 4,  1 => 2,), array (  0 => -2,))
740array(2) {
741  [0]=>
742  string(11) "ala bala la"
743  [1]=>
744  string(7) "trbala "
745}
746
747
748
749
750
751
752
753substr_replace(array (  0 => 'ala portokala',), 'bala ',array (  0 => 4,  1 => 2,))
754array(1) {
755  [0]=>
756  string(9) "ala bala "
757}
758
759
760substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), array (  0 => 'bala ',),array (  0 => 4,  1 => 2,), array (  0 => 3,  1 => 2,))
761array(2) {
762  [0]=>
763  string(15) "ala bala tokala"
764  [1]=>
765  string(6) "trthis"
766}
767
768
769substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), 'bala ',array (  0 => 4,  1 => 2,), array (  0 => 3,  1 => 2,))
770array(2) {
771  [0]=>
772  string(15) "ala bala tokala"
773  [1]=>
774  string(11) "trbala this"
775}
776
777substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), array (  0 => 'bala ',),array (  0 => 4,  1 => 2,), array (  0 => 0,  1 => 0,))
778array(2) {
779  [0]=>
780  string(18) "ala bala portokala"
781  [1]=>
782  string(8) "try this"
783}
784
785
786substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), 'bala ',array (  0 => 4,  1 => 2,), array (  0 => 0,  1 => 0,))
787array(2) {
788  [0]=>
789  string(18) "ala bala portokala"
790  [1]=>
791  string(13) "trbala y this"
792}
793
794substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), array (  0 => 'bala ',),array (  0 => 4,  1 => 2,), array (  0 => -2,  1 => -3,))
795array(2) {
796  [0]=>
797  string(11) "ala bala la"
798  [1]=>
799  string(5) "trhis"
800}
801
802
803substr_replace(array (  0 => 'ala portokala',  1 => 'try this',), 'bala ',array (  0 => 4,  1 => 2,), array (  0 => -2,  1 => -3,))
804array(2) {
805  [0]=>
806  string(11) "ala bala la"
807  [1]=>
808  string(10) "trbala his"
809}
810
811