3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file_data = 'Can we get Prism Cluster Mail in summarize way like below. ---------------------------------------------------------------- { "Employees":[ { "userId":"rirani", "jobTitleName":"Developer", "firstName":"Romin", "lastName":"Irani", "preferredFullName":"Romin Irani", "employeeCode":"E1", "region":"CA", "phoneNumber":"408-1234567", "emailAddress":"romin.k.irani@gmail.com" }, { "userId":"nirani", "jobTitleName":"Developer", "firstName":"Neil", "lastName":"Irani", "preferredFullName":"Neil Irani", "employeeCode":"E2", "region":"CA", "phoneNumber":"408-1111111", "emailAddress":"neilrirani@gmail.com" }, { "userId":"thanks", "jobTitleName":"Program Directory", "firstName":"Tom", "lastName":"Hanks", "preferredFullName":"Tom Hanks", "employeeCode":"E3", "region":"CA", "phoneNumber":"408-2222222", "emailAddress":"tomhanks@gmail.com" } ] } Best Regards The Team'; //get file data into an array and remove first 3 lines $file_data_arr = explode("\n", $file_data); $file_data_arr = array_slice($file_data_arr, 3); //Now remove last 3 lines and convert back to a string array_splice($file_data_arr, -3); $json_string = implode("\n", $file_data_arr); // Decode the JSON string into a PHP object $data = json_decode($json_string); // Extract the desired data from the object foreach ($data->Employees as $employee) { $userId = $employee->userId; $jobTitleName = $employee->jobTitleName; $phoneNumber = $employee->phoneNumber; // Do something with the extracted data, such as print it out echo "User ID: $userId, Job Title: $jobTitleName, Phone Number: $phoneNumber\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 26, Position 2 = 42
Branch analysis from position: 26
2 jumps found. (Code = 78) Position 1 = 27, Position 2 = 42
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
filename:       /in/Ar7ne
function name:  (null)
number of ops:  44
compiled vars:  !0 = $file_data, !1 = $file_data_arr, !2 = $json_string, !3 = $data, !4 = $employee, !5 = $userId, !6 = $jobTitleName, !7 = $phoneNumber
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Can+we+get+Prism+Cluster+Mail+in+summarize+way+like+below.++%0A----------------------------------------------------------------%0A%0A%7B%0A+++%22Employees%22%3A%5B%0A++++++%7B%0A+++++++++%22userId%22%3A%22rirani%22%2C%0A+++++++++%22jobTitleName%22%3A%22Developer%22%2C%0A+++++++++%22firstName%22%3A%22Romin%22%2C%0A+++++++++%22lastName%22%3A%22Irani%22%2C%0A+++++++++%22preferredFullName%22%3A%22Romin+Irani%22%2C%0A+++++++++%22employeeCode%22%3A%22E1%22%2C%0A+++++++++%22region%22%3A%22CA%22%2C%0A+++++++++%22phoneNumber%22%3A%22408-1234567%22%2C%0A+++++++++%22emailAddress%22%3A%22romin.k.irani%40gmail.com%22%0A++++++%7D%2C%0A++++++%7B%0A+++++++++%22userId%22%3A%22nirani%22%2C%0A+++++++++%22jobTitleName%22%3A%22Developer%22%2C%0A+++++++++%22firstName%22%3A%22Neil%22%2C%0A+++++++++%22lastName%22%3A%22Irani%22%2C%0A+++++++++%22preferredFullName%22%3A%22Neil+Irani%22%2C%0A+++++++++%22employeeCode%22%3A%22E2%22%2C%0A+++++++++%22region%22%3A%22CA%22%2C%0A+++++++++%22phoneNumber%22%3A%22408-1111111%22%2C%0A+++++++++%22emailAddress%22%3A%22neilrirani%40gmail.com%22%0A++++++%7D%2C%0A++++++%7B%0A+++++++++%22userId%22%3A%22thanks%22%2C%0A+++++++++%22jobTitleName%22%3A%22Program+Directory%22%2C%0A+++++++++%22firstName%22%3A%22Tom%22%2C%0A+++++++++%22lastName%22%3A%22Hanks%22%2C%0A+++++++++%22preferredFullName%22%3A%22Tom+Hanks%22%2C%0A+++++++++%22employeeCode%22%3A%22E3%22%2C%0A+++++++++%22region%22%3A%22CA%22%2C%0A+++++++++%22phoneNumber%22%3A%22408-2222222%22%2C%0A+++++++++%22emailAddress%22%3A%22tomhanks%40gmail.com%22%0A++++++%7D%0A+++%5D%0A%7D%0A%0ABest+Regards%0AThe+Team'
   48     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%0A'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $9      
          5        ASSIGN                                                   !1, $9
   49     6        INIT_FCALL                                               'array_slice'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 3
          9        DO_ICALL                                         $11     
         10        ASSIGN                                                   !1, $11
   52    11        INIT_FCALL                                               'array_splice'
         12        SEND_REF                                                 !1
         13        SEND_VAL                                                 -3
         14        DO_ICALL                                                 
   53    15        INIT_FCALL                                               'implode'
         16        SEND_VAL                                                 '%0A'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $14     
         19        ASSIGN                                                   !2, $14
   56    20        INIT_FCALL                                               'json_decode'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                         $16     
         23        ASSIGN                                                   !3, $16
   59    24        FETCH_OBJ_R                                      ~18     !3, 'Employees'
         25      > FE_RESET_R                                       $19     ~18, ->42
         26    > > FE_FETCH_R                                               $19, !4, ->42
   60    27    >   FETCH_OBJ_R                                      ~20     !4, 'userId'
         28        ASSIGN                                                   !5, ~20
   61    29        FETCH_OBJ_R                                      ~22     !4, 'jobTitleName'
         30        ASSIGN                                                   !6, ~22
   62    31        FETCH_OBJ_R                                      ~24     !4, 'phoneNumber'
         32        ASSIGN                                                   !7, ~24
   65    33        ROPE_INIT                                     7  ~27     'User+ID%3A+'
         34        ROPE_ADD                                      1  ~27     ~27, !5
         35        ROPE_ADD                                      2  ~27     ~27, '%2C+Job+Title%3A+'
         36        ROPE_ADD                                      3  ~27     ~27, !6
         37        ROPE_ADD                                      4  ~27     ~27, '%2C+Phone+Number%3A+'
         38        ROPE_ADD                                      5  ~27     ~27, !7
         39        ROPE_END                                      6  ~26     ~27, '%0A'
         40        ECHO                                                     ~26
   59    41      > JMP                                                      ->26
         42    >   FE_FREE                                                  $19
   66    43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.52 ms | 1011 KiB | 18 Q