Annotation of embedaddon/php/ext/pcre/tests/preg_replace_callback3.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: preg_replace_callback() 3
! 3: --FILE--
! 4: <?php
! 5:
! 6: var_dump(preg_replace_callback());
! 7: var_dump(preg_replace_callback(1));
! 8: var_dump(preg_replace_callback(1,2));
! 9: var_dump(preg_replace_callback(1,2,3));
! 10: var_dump(preg_replace_callback(1,2,3,4));
! 11: $a = 5;
! 12: var_dump(preg_replace_callback(1,2,3,4,$a));
! 13: $a = "";
! 14: var_dump(preg_replace_callback("","","","",$a));
! 15: $a = array();
! 16: var_dump(preg_replace_callback($a,$a,$a,$a,$a));
! 17:
! 18: echo "Done\n";
! 19: ?>
! 20: --EXPECTF--
! 21: Warning: preg_replace_callback() expects at least 3 parameters, 0 given in %s on line %d
! 22: NULL
! 23:
! 24: Warning: preg_replace_callback() expects at least 3 parameters, 1 given in %s on line %d
! 25: NULL
! 26:
! 27: Warning: preg_replace_callback() expects at least 3 parameters, 2 given in %s on line %d
! 28: NULL
! 29:
! 30: Warning: preg_replace_callback(): Requires argument 2, '2', to be a valid callback in %s on line %d
! 31: int(3)
! 32:
! 33: Warning: preg_replace_callback(): Requires argument 2, '2', to be a valid callback in %s on line %d
! 34: int(3)
! 35:
! 36: Warning: preg_replace_callback(): Requires argument 2, '2', to be a valid callback in %s on line %d
! 37: int(3)
! 38:
! 39: Warning: preg_replace_callback() expects parameter 4 to be long, string given in %s on line %d
! 40: NULL
! 41:
! 42: Warning: preg_replace_callback() expects parameter 4 to be long, array given in %s on line %d
! 43: NULL
! 44: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>