3v4l.org

run code in 300+ PHP versions simultaneously
<?php $configuration = array('<?php'); $define = function($def, $value) use (&$configuration) { $v = addslashes($value); $configuration[] = "define('{$def}', '{$v}');"; }; $define('DB_SERVER', 'test'); $define('DB_USERNAME', 'test2'); $define('DB_PASSWORD', 'test3'); $define('DB_DATABASE', 'test4'); $define('PASSWORD_SALT', 'test5'); $define('OAUTH_CONSUMER_KEY', 'test6'); $define('OAUTH_CONSUMER_SECRET', 'test7'); echo implode("\n", $configuration);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1D4pv
function name:  (null)
number of ops:  38
compiled vars:  !0 = $configuration, !1 = $define
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F1D4pv%3A5%240'
          2        BIND_LEXICAL                                             ~3, !0
          3        ASSIGN                                                   !1, ~3
   10     4        INIT_DYNAMIC_CALL                                        !1
          5        SEND_VAL_EX                                              'DB_SERVER'
          6        SEND_VAL_EX                                              'test'
          7        DO_FCALL                                      0          
   11     8        INIT_DYNAMIC_CALL                                        !1
          9        SEND_VAL_EX                                              'DB_USERNAME'
         10        SEND_VAL_EX                                              'test2'
         11        DO_FCALL                                      0          
   12    12        INIT_DYNAMIC_CALL                                        !1
         13        SEND_VAL_EX                                              'DB_PASSWORD'
         14        SEND_VAL_EX                                              'test3'
         15        DO_FCALL                                      0          
   13    16        INIT_DYNAMIC_CALL                                        !1
         17        SEND_VAL_EX                                              'DB_DATABASE'
         18        SEND_VAL_EX                                              'test4'
         19        DO_FCALL                                      0          
   15    20        INIT_DYNAMIC_CALL                                        !1
         21        SEND_VAL_EX                                              'PASSWORD_SALT'
         22        SEND_VAL_EX                                              'test5'
         23        DO_FCALL                                      0          
   17    24        INIT_DYNAMIC_CALL                                        !1
         25        SEND_VAL_EX                                              'OAUTH_CONSUMER_KEY'
         26        SEND_VAL_EX                                              'test6'
         27        DO_FCALL                                      0          
   18    28        INIT_DYNAMIC_CALL                                        !1
         29        SEND_VAL_EX                                              'OAUTH_CONSUMER_SECRET'
         30        SEND_VAL_EX                                              'test7'
         31        DO_FCALL                                      0          
   20    32        INIT_FCALL                                               'implode'
         33        SEND_VAL                                                 '%0A'
         34        SEND_VAR                                                 !0
         35        DO_ICALL                                         $12     
         36        ECHO                                                     $12
         37      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F1D4pv%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1D4pv
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $def, !1 = $value, !2 = $configuration, !3 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
    6     3        INIT_FCALL                                               'addslashes'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !3, $4
    7     7        ROPE_INIT                                     5  ~8      'define%28%27'
          8        ROPE_ADD                                      1  ~8      ~8, !0
          9        ROPE_ADD                                      2  ~8      ~8, '%27%2C+%27'
         10        ROPE_ADD                                      3  ~8      ~8, !3
         11        ROPE_END                                      4  ~7      ~8, '%27%29%3B'
         12        ASSIGN_DIM                                               !2
         13        OP_DATA                                                  ~7
    8    14      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F1D4pv%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.67 ms | 1400 KiB | 17 Q