3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('COURSE_PORTAL_URL', "https://learn.kognito.com/auth"); $pattern = '/https?:\/\/learn[.]kognito[.]com\/auth/'; $replacement = COURSE_PORTAL_URL; $courseData['auth_url'] = preg_replace($pattern, $replacement, $inputURL, 1); echo $courseData['auth_url'] . "?k=" . $cookie_id;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2WBJt
function name:  (null)
number of ops:  20
compiled vars:  !0 = $pattern, !1 = $replacement, !2 = $courseData, !3 = $inputURL, !4 = $cookie_id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'COURSE_PORTAL_URL'
          2        SEND_VAL                                                 'https%3A%2F%2Flearn.kognito.com%2Fauth'
          3        DO_ICALL                                                 
    3     4        ASSIGN                                                   !0, '%2Fhttps%3F%3A%5C%2F%5C%2Flearn%5B.%5Dkognito%5B.%5Dcom%5C%2Fauth%2F'
    4     5        FETCH_CONSTANT                                   ~7      'COURSE_PORTAL_URL'
          6        ASSIGN                                                   !1, ~7
    5     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !3
         11        SEND_VAL                                                 1
         12        DO_ICALL                                         $10     
         13        ASSIGN_DIM                                               !2, 'auth_url'
         14        OP_DATA                                                  $10
    6    15        FETCH_DIM_R                                      ~11     !2, 'auth_url'
         16        CONCAT                                           ~12     ~11, '%3Fk%3D'
         17        CONCAT                                           ~13     ~12, !4
         18        ECHO                                                     ~13
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.53 ms | 1395 KiB | 17 Q