3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(php_uname('s')); @mkdir(sys_get_temp_dir() . '/src', 0700); preg_match_all('/\`\`\`php(.*?)\`\`\`/s', file_get_contents('http://raw.github.com/php-fig/fig-standards/master/accepted/PSR-4-autoloader-examples.md'), $m); file_put_contents(sys_get_temp_dir() . '/autoloader.php', $m[1][0]); file_put_contents(sys_get_temp_dir() . '/src/Baz.php', "<?php namespace Foo\Bar; class BAZ {}"); file_put_contents(sys_get_temp_dir() . '/src/Buz.php', "<?php namespace Foo\Bar; class Buz {}"); require sys_get_temp_dir() . '/autoloader.php'; $c1 = new \Foo\Bar\Baz(); $c2 = new \Foo\Bar\BAZ(); var_dump($c1 == $c2); $c3 = new \Foo\Bar\BUZ(); $c4 = new \Foo\Bar\Buz(); var_dump($c3 == $c4);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KubLK
function name:  (null)
number of ops:  71
compiled vars:  !0 = $m, !1 = $c1, !2 = $c2, !3 = $c3, !4 = $c4
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'php_uname'
          2        SEND_VAL                                                 's'
          3        DO_ICALL                                         $5      
          4        SEND_VAR                                                 $5
          5        DO_ICALL                                                 
    5     6        BEGIN_SILENCE                                    ~7      
          7        INIT_FCALL                                               'mkdir'
          8        INIT_FCALL                                               'sys_get_temp_dir'
          9        DO_ICALL                                         $8      
         10        CONCAT                                           ~9      $8, '%2Fsrc'
         11        SEND_VAL                                                 ~9
         12        SEND_VAL                                                 448
         13        DO_ICALL                                                 
         14        END_SILENCE                                              ~7
    6    15        INIT_FCALL                                               'preg_match_all'
         16        SEND_VAL                                                 '%2F%5C%60%5C%60%5C%60php%28.%2A%3F%29%5C%60%5C%60%5C%60%2Fs'
         17        INIT_FCALL                                               'file_get_contents'
         18        SEND_VAL                                                 'http%3A%2F%2Fraw.github.com%2Fphp-fig%2Ffig-standards%2Fmaster%2Faccepted%2FPSR-4-autoloader-examples.md'
         19        DO_ICALL                                         $11     
         20        SEND_VAR                                                 $11
         21        SEND_REF                                                 !0
         22        DO_ICALL                                                 
    7    23        INIT_FCALL                                               'file_put_contents'
         24        INIT_FCALL                                               'sys_get_temp_dir'
         25        DO_ICALL                                         $13     
         26        CONCAT                                           ~14     $13, '%2Fautoloader.php'
         27        SEND_VAL                                                 ~14
         28        FETCH_DIM_R                                      ~15     !0, 1
         29        FETCH_DIM_R                                      ~16     ~15, 0
         30        SEND_VAL                                                 ~16
         31        DO_ICALL                                                 
    8    32        INIT_FCALL                                               'file_put_contents'
         33        INIT_FCALL                                               'sys_get_temp_dir'
         34        DO_ICALL                                         $18     
         35        CONCAT                                           ~19     $18, '%2Fsrc%2FBaz.php'
         36        SEND_VAL                                                 ~19
         37        SEND_VAL                                                 '%3C%3Fphp+namespace+Foo%5CBar%3B+class+BAZ+%7B%7D'
         38        DO_ICALL                                                 
    9    39        INIT_FCALL                                               'file_put_contents'
         40        INIT_FCALL                                               'sys_get_temp_dir'
         41        DO_ICALL                                         $21     
         42        CONCAT                                           ~22     $21, '%2Fsrc%2FBuz.php'
         43        SEND_VAL                                                 ~22
         44        SEND_VAL                                                 '%3C%3Fphp+namespace+Foo%5CBar%3B+class+Buz+%7B%7D'
         45        DO_ICALL                                                 
   11    46        INIT_FCALL                                               'sys_get_temp_dir'
         47        DO_ICALL                                         $24     
         48        CONCAT                                           ~25     $24, '%2Fautoloader.php'
         49        INCLUDE_OR_EVAL                                          ~25, REQUIRE
   13    50        NEW                                              $27     'Foo%5CBar%5CBaz'
         51        DO_FCALL                                      0          
         52        ASSIGN                                                   !1, $27
   14    53        NEW                                              $30     'Foo%5CBar%5CBAZ'
         54        DO_FCALL                                      0          
         55        ASSIGN                                                   !2, $30
   16    56        INIT_FCALL                                               'var_dump'
         57        IS_EQUAL                                         ~33     !1, !2
         58        SEND_VAL                                                 ~33
         59        DO_ICALL                                                 
   18    60        NEW                                              $35     'Foo%5CBar%5CBUZ'
         61        DO_FCALL                                      0          
         62        ASSIGN                                                   !3, $35
   19    63        NEW                                              $38     'Foo%5CBar%5CBuz'
         64        DO_FCALL                                      0          
         65        ASSIGN                                                   !4, $38
   21    66        INIT_FCALL                                               'var_dump'
         67        IS_EQUAL                                         ~41     !3, !4
         68        SEND_VAL                                                 ~41
         69        DO_ICALL                                                 
         70      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.72 ms | 1400 KiB | 27 Q