3v4l.org

run code in 300+ PHP versions simultaneously
<?php function my_udf_md5($string) { throw new \Exception("test exception\n"); } $db = new SQLite3(':memory:'); $db->createFunction('my_udf_md5', 'my_udf_md5'); try { $result = $db->querySingle('SELECT my_udf_md5("test")'); var_dump($result); } catch(\Exception $e) { echo "Exception: ".$e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 16
Branch analysis from position: 16
2 jumps found. (Code = 107) Position 1 = 17, Position 2 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I4TpT
function name:  (null)
number of ops:  22
compiled vars:  !0 = $db, !1 = $result, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $3      'SQLite3'
          1        SEND_VAL_EX                                              '%3Amemory%3A'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    7     4        INIT_METHOD_CALL                                         !0, 'createFunction'
          5        SEND_VAL_EX                                              'my_udf_md5'
          6        SEND_VAL_EX                                              'my_udf_md5'
          7        DO_FCALL                                      0          
   10     8        INIT_METHOD_CALL                                         !0, 'querySingle'
          9        SEND_VAL_EX                                              'SELECT+my_udf_md5%28%22test%22%29'
         10        DO_FCALL                                      0  $7      
         11        ASSIGN                                                   !1, $7
   11    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > JMP                                                      ->21
   13    16  E > > CATCH                                       last         'Exception'
   14    17    >   INIT_METHOD_CALL                                         !2, 'getMessage'
         18        DO_FCALL                                      0  $10     
         19        CONCAT                                           ~11     'Exception%3A+', $10
         20        ECHO                                                     ~11
   15    21    > > RETURN                                                   1

Function my_udf_md5:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/I4TpT
function name:  my_udf_md5
number of ops:  6
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        NEW                                              $1      'Exception'
          2        SEND_VAL_EX                                              'test+exception%0A'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $1
    4     5*     > RETURN                                                   null

End of function my_udf_md5

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.53 ms | 1396 KiB | 15 Q