3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = "42 OR 1=1; --"; $formats = [ 'b', 'c', 'd', 'e', 'E', 'f', 'F', 'g', 'G', 'h', 'H', 'o', 's', 'u', 'x', 'X', ]; foreach ( $formats as $format ) { $format_str = 'SELECT * FROM wp_posts WHERE post_author=%' . $format; $res[ $format ] = sprintf( $format_str, $var ); } var_dump( $res );
Output for git.master_jit, git.master, rfc.property-hooks
array(16) { ["b"]=> string(47) "SELECT * FROM wp_posts WHERE post_author=101010" ["c"]=> string(42) "SELECT * FROM wp_posts WHERE post_author=*" ["d"]=> string(43) "SELECT * FROM wp_posts WHERE post_author=42" ["e"]=> string(52) "SELECT * FROM wp_posts WHERE post_author=4.200000e+1" ["E"]=> string(52) "SELECT * FROM wp_posts WHERE post_author=4.200000E+1" ["f"]=> string(50) "SELECT * FROM wp_posts WHERE post_author=42.000000" ["F"]=> string(50) "SELECT * FROM wp_posts WHERE post_author=42.000000" ["g"]=> string(43) "SELECT * FROM wp_posts WHERE post_author=42" ["G"]=> string(43) "SELECT * FROM wp_posts WHERE post_author=42" ["h"]=> string(43) "SELECT * FROM wp_posts WHERE post_author=42" ["H"]=> string(43) "SELECT * FROM wp_posts WHERE post_author=42" ["o"]=> string(43) "SELECT * FROM wp_posts WHERE post_author=52" ["s"]=> string(54) "SELECT * FROM wp_posts WHERE post_author=42 OR 1=1; --" ["u"]=> string(43) "SELECT * FROM wp_posts WHERE post_author=42" ["x"]=> string(43) "SELECT * FROM wp_posts WHERE post_author=2a" ["X"]=> string(43) "SELECT * FROM wp_posts WHERE post_author=2A" }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
77.27 ms | 409 KiB | 5 Q