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 );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/CucX5
function name:  (null)
number of ops:  18
compiled vars:  !0 = $var, !1 = $formats, !2 = $format, !3 = $format_str, !4 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '42+OR+1%3D1%3B+--'
    4     1        ASSIGN                                                   !1, <array>
   23     2      > FE_RESET_R                                       $7      !1, ->13
          3    > > FE_FETCH_R                                               $7, !2, ->13
   24     4    >   CONCAT                                           ~8      'SELECT+%2A+FROM+wp_posts+WHERE+post_author%3D%25', !2
          5        ASSIGN                                                   !3, ~8
   25     6        INIT_FCALL                                               'sprintf'
          7        SEND_VAR                                                 !3
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $11     
         10        ASSIGN_DIM                                               !4, !2
         11        OP_DATA                                                  $11
   23    12      > JMP                                                      ->3
         13    >   FE_FREE                                                  $7
   27    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !4
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.26 ms | 1006 KiB | 15 Q