Skip to main content
added 3 characters in body
Source Link
z-boss
  • 17.7k
  • 13
  • 55
  • 82

youYou can use a function with a undefined number of argumentsfunctions with a undefined number of arguments using the func_get_args().

<?php function test() { $args = func_get_args(); echo $args[2]; // will print 'd' echo $args[1]; // will print 3 } test(1,3,'d',4); ?> 

you can use a function with a undefined number of arguments using the func_get_args().

<?php function test() { $args = func_get_args(); echo $args[2]; // will print 'd' echo $args[1]; // will print 3 } test(1,3,'d',4); ?> 

You can use functions with a undefined number of arguments using the func_get_args().

<?php function test() { $args = func_get_args(); echo $args[2]; // will print 'd' echo $args[1]; // will print 3 } test(1,3,'d',4); ?> 
Formatting fix.
Source Link
strager
  • 90.3k
  • 27
  • 139
  • 181

you can use a function with a undefined number of arguments using the func_ get_args()func_get_args().

<?php function test() { $args = func_get_args(); echo $args[2]; // will print 'd' echo $args[1]; // will print 3 } test(1,3,'d',4); ?> 

you can use a function with a undefined number of arguments using the func_ get_args()

<?php function test() { $args = func_get_args(); echo $args[2]; // will print 'd' echo $args[1]; // will print 3 } test(1,3,'d',4); ?> 

you can use a function with a undefined number of arguments using the func_get_args().

<?php function test() { $args = func_get_args(); echo $args[2]; // will print 'd' echo $args[1]; // will print 3 } test(1,3,'d',4); ?> 
added 46 characters in body
Source Link
Ionuț G. Stan
  • 179.5k
  • 19
  • 196
  • 206

you can use a function with a undefined number of arguments using the func_ get_args()

<?php 

function test() {

 function test() { $args = func_get_args();  echo $args[2]; // will print 'd'  echo $args[1]; // will print 3 } test(1,3,'d',4); ?> 

}

test(1,3,'d',4);

?>

you can use a function with a undefined number of arguments using the func_ get_args()

<?php 

function test() {

$args = func_get_args(); echo $args[2]; // will print 'd' echo $args[1]; // will print 3 

}

test(1,3,'d',4);

?>

you can use a function with a undefined number of arguments using the func_ get_args()

<?php  function test() { $args = func_get_args();  echo $args[2]; // will print 'd'  echo $args[1]; // will print 3 } test(1,3,'d',4); ?> 
Post Made Community Wiki
Source Link
TheBrain
  • 5.6k
  • 2
  • 27
  • 26
Loading