3v4l.org

run code in 300+ PHP versions simultaneously
<?php header("Cache-Control: max-age=301, must-revalidate, stale-while-revalidate=150, stale-if-error=60"); $env = "int";//getenv("SERVER_ENV"); $INSTRUCTOR_LOCATIONS = array( 'sandbox' => 'http://sandbox.bbc.co.uk:9000/', 'int' => 'http://crb-brb-instructor.int.api.bbci.co.uk/', 'test' => 'http://crb-brb-instructor.test.api.bbci.co.uk/', 'stage' => 'http://crb-brb-instructor.api.bbci.co.uk/', 'live' => 'http://crb-brb-instructor.api.bbci.co.uk/' ); $PLATFORMS = array('freeview', 'freesat'); $REGISTRATION_ENABLED_ON = array('sandbox', 'int', 'test', 'stage', 'live'); $instructorLocation = (isset($INSTRUCTOR_LOCATIONS[$env])) ? $INSTRUCTOR_LOCATIONS[$env] : 'http://config-error/'; $registrationEnabled = (in_array($env, $REGISTRATION_ENABLED_ON)) ? 'true' : 'false'; //$platformName = isset($_GET['platformName']) ? $_GET['platformName'] : ''; //$platform = in_array($platformName, $PLATFORMS) ? $platformName : 'freesat'; // Helper methods function printRCValue($tagName, $value) { print sprintf("@%s|%s|\n", $tagName, $value); } // Generate RC file response printRCValue('ServerEnvironment', $env); printRCValue('ServerLocation', "http://open.$env.bbc.co.uk/smartbridge/"); printRCValue('InstructorLocation', $instructorLocation); printRCValue('RegistrationEnabled', $registrationEnabled); //printRCValue('MakeAndModelServiceLocation', "http://open.int.bbc.co.uk/smartbridge/content-provider/platform/$platform/makeAndModel.rc?whoami=PANT14A01");
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
Branch analysis from position: 21
filename:       /in/9aNFW
function name:  (null)
number of ops:  43
compiled vars:  !0 = $env, !1 = $INSTRUCTOR_LOCATIONS, !2 = $PLATFORMS, !3 = $REGISTRATION_ENABLED_ON, !4 = $instructorLocation, !5 = $registrationEnabled
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'Cache-Control%3A+max-age%3D301%2C+must-revalidate%2C+stale-while-revalidate%3D150%2C+stale-if-error%3D60'
          2        DO_ICALL                                                 
    3     3        ASSIGN                                                   !0, 'int'
    5     4        ASSIGN                                                   !1, <array>
   13     5        ASSIGN                                                   !2, <array>
   15     6        ASSIGN                                                   !3, <array>
   17     7        ISSET_ISEMPTY_DIM_OBJ                         0          !1, !0
          8      > JMPZ                                                     ~11, ->12
          9    >   FETCH_DIM_R                                      ~12     !1, !0
         10        QM_ASSIGN                                        ~13     ~12
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~13     'http%3A%2F%2Fconfig-error%2F'
         13    >   ASSIGN                                                   !4, ~13
   18    14        INIT_FCALL                                               'in_array'
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $15     
         18      > JMPZ                                                     $15, ->21
         19    >   QM_ASSIGN                                        ~16     'true'
         20      > JMP                                                      ->22
         21    >   QM_ASSIGN                                        ~16     'false'
         22    >   ASSIGN                                                   !5, ~16
   29    23        INIT_FCALL                                               'printrcvalue'
         24        SEND_VAL                                                 'ServerEnvironment'
         25        SEND_VAR                                                 !0
         26        DO_FCALL                                      0          
   30    27        INIT_FCALL                                               'printrcvalue'
         28        SEND_VAL                                                 'ServerLocation'
         29        ROPE_INIT                                     3  ~20     'http%3A%2F%2Fopen.'
         30        ROPE_ADD                                      1  ~20     ~20, !0
         31        ROPE_END                                      2  ~19     ~20, '.bbc.co.uk%2Fsmartbridge%2F'
         32        SEND_VAL                                                 ~19
         33        DO_FCALL                                      0          
   31    34        INIT_FCALL                                               'printrcvalue'
         35        SEND_VAL                                                 'InstructorLocation'
         36        SEND_VAR                                                 !4
         37        DO_FCALL                                      0          
   32    38        INIT_FCALL                                               'printrcvalue'
         39        SEND_VAL                                                 'RegistrationEnabled'
         40        SEND_VAR                                                 !5
         41        DO_FCALL                                      0          
   33    42      > RETURN                                                   1

Function printrcvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9aNFW
function name:  printRCValue
number of ops:  9
compiled vars:  !0 = $tagName, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   25     2        INIT_FCALL                                               'sprintf'
          3        SEND_VAL                                                 '%40%25s%7C%25s%7C%0A'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $2      
          7        ECHO                                                     $2
   26     8      > RETURN                                                   null

End of function printrcvalue

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.19 ms | 1403 KiB | 23 Q