3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function mysqli_real_escape_string($a) { return $a; } function callStoredProc( $storedProc ) { $args = func_get_args(); $storedProc = array_shift( $args ); foreach ( $args as $i => $arg) $args[$i] = "'" . mysqli_real_escape_string( $arg ) . "'"; $argStr = implode( ',', $args ); echo sprintf( 'call %s( %s )', $storedProc, implode( ',', $args ) ); } callStoredProc( 'something', 1, 'a', 'b\'' );
Output for 4.3.0 - 7.1.0
call something( '1','a','b'' )