3v4l.org

run code in 300+ PHP versions simultaneously
<?php // prints: mysql link $c = mysql_connect(); echo get_resource_type($c) . "\n"; // prints: stream $fp = fopen("foo", "w"); echo get_resource_type($fp) . "\n"; // prints: domxml document $doc = new_xmldoc("1.0"); echo get_resource_type($doc->doc) . "\n"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qW5sE
function name:  (null)
number of ops:  29
compiled vars:  !0 = $c, !1 = $fp, !2 = $doc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL_BY_NAME                                       'mysql_connect'
          1        DO_FCALL                                      0  $3      
          2        ASSIGN                                                   !0, $3
    6     3        INIT_FCALL                                               'get_resource_type'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        CONCAT                                           ~6      $5, '%0A'
          7        ECHO                                                     ~6
    9     8        INIT_FCALL                                               'fopen'
          9        SEND_VAL                                                 'foo'
         10        SEND_VAL                                                 'w'
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !1, $7
   10    13        INIT_FCALL                                               'get_resource_type'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $9      
         16        CONCAT                                           ~10     $9, '%0A'
         17        ECHO                                                     ~10
   13    18        INIT_FCALL_BY_NAME                                       'new_xmldoc'
         19        SEND_VAL_EX                                              '1.0'
         20        DO_FCALL                                      0  $11     
         21        ASSIGN                                                   !2, $11
   14    22        INIT_FCALL                                               'get_resource_type'
         23        FETCH_OBJ_R                                      ~13     !2, 'doc'
         24        SEND_VAL                                                 ~13
         25        DO_ICALL                                         $14     
         26        CONCAT                                           ~15     $14, '%0A'
         27        ECHO                                                     ~15
   15    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.66 ms | 940 KiB | 18 Q