3v4l.org

run code in 300+ PHP versions simultaneously
<?php function testing($val) { echo "Testing with: $val\n"; return true; } $conn = new SQLite3(':memory:'); $conn->exec("CREATE TABLE test (id int)"); for ($i = 0; $i < 3; $i++) { $conn->exec("INSERT INTO test VALUES ($i)"); } $conn->createFunction('testing', 'testing', 1); $res = $conn->query('SELECT * FROM test WHERE testing(id)'); $arr = $res->fetchArray(); $arr = $res->fetchArray(); $arr = $res->fetchArray();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 9
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 9
Branch analysis from position: 18
Branch analysis from position: 9
filename:       /in/MMGio
function name:  (null)
number of ops:  37
compiled vars:  !0 = $conn, !1 = $i, !2 = $res, !3 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $4      'SQLite3'
          1        SEND_VAL_EX                                              '%3Amemory%3A'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    9     4        INIT_METHOD_CALL                                         !0, 'exec'
          5        SEND_VAL_EX                                              'CREATE+TABLE+test+%28id+int%29'
          6        DO_FCALL                                      0          
   10     7        ASSIGN                                                   !1, 0
          8      > JMP                                                      ->16
   11     9    >   INIT_METHOD_CALL                                         !0, 'exec'
         10        ROPE_INIT                                     3  ~10     'INSERT+INTO+test+VALUES+%28'
         11        ROPE_ADD                                      1  ~10     ~10, !1
         12        ROPE_END                                      2  ~9      ~10, '%29'
         13        SEND_VAL_EX                                              ~9
         14        DO_FCALL                                      0          
   10    15        PRE_INC                                                  !1
         16    >   IS_SMALLER                                               !1, 3
         17      > JMPNZ                                                    ~14, ->9
   13    18    >   INIT_METHOD_CALL                                         !0, 'createFunction'
         19        SEND_VAL_EX                                              'testing'
         20        SEND_VAL_EX                                              'testing'
         21        SEND_VAL_EX                                              1
         22        DO_FCALL                                      0          
   15    23        INIT_METHOD_CALL                                         !0, 'query'
         24        SEND_VAL_EX                                              'SELECT+%2A+FROM+test+WHERE+testing%28id%29'
         25        DO_FCALL                                      0  $16     
         26        ASSIGN                                                   !2, $16
   17    27        INIT_METHOD_CALL                                         !2, 'fetchArray'
         28        DO_FCALL                                      0  $18     
         29        ASSIGN                                                   !3, $18
   18    30        INIT_METHOD_CALL                                         !2, 'fetchArray'
         31        DO_FCALL                                      0  $20     
         32        ASSIGN                                                   !3, $20
   19    33        INIT_METHOD_CALL                                         !2, 'fetchArray'
         34        DO_FCALL                                      0  $22     
         35        ASSIGN                                                   !3, $22
         36      > RETURN                                                   1

Function testing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MMGio
function name:  testing
number of ops:  7
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ROPE_INIT                                     3  ~2      'Testing+with%3A+'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%0A'
          4        ECHO                                                     ~1
    5     5      > RETURN                                                   <true>
    6     6*     > RETURN                                                   null

End of function testing

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.88 ms | 1399 KiB | 13 Q