3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<test> <round round_id="21402" title="Final" start_date="2016-03-06" end_date="2016-03-06" scoringsystem="BO3" groups="0" ties="0" ordermethod="1" prize_money="6400" prize_currency="usd" last_updated="2016-03-06 12:32:41"> <match match_id="154374" official_start_date="2016-03-06" official_start_time="08:00:00" actual_start_date="" actual_start_time="" winner="B" score_A="1" score_B="2" status="Played" drawposition="1" person_A_id="" person_A_name="" person_A_country="" person_B_id="" person_B_name="" person_B_country="" double_A_id="15014" double_A_country="" person_A1_id="27475" person_A1_name="Liang Chen" person_A1_country="CHN" person_A2_id="29558" person_A2_name="Wang Yafan" person_A2_country="CHN" double_B_id="17263" double_B_country="" person_B1_id="27351" person_B1_name="V. Wongteanchai" person_B1_country="THA" person_B2_id="30339" person_B2_name="Yang Zhaoxuan" person_B2_country="CHN" last_updated="2016-03-06 12:32:41" time_unknown="no"> <matchstatistics> <double double_id="15014" name="Liang Chen / Wang Yafan"> <statistics aces="1" dbl_faults="3" first_srv_point_won="31" first_srv_point_total="46" sec_srv_point_won="7" sec_srv="21" break_point_won="6" break_point_total="8" service_games_played="10" first_ret_point_won="13" first_ret_point_total="42" sec_ret_point_won="11" sec_ret_point="19" break_ret_point_won="2" break_ret_total="6" return_games_played="10" total_service_points_won="38" total_service_points_total="67" total_return_points_won="24" total_return_points_total="61" total_points_won="62" total_points="128"/> </double> <double double_id="17263" name="V. Wongteanchai / Yang Zhaoxuan"> <statistics aces="1" dbl_faults="2" first_srv_point_won="29" first_srv_point_total="42" sec_srv_point_won="8" sec_srv="19" break_point_won="4" break_point_total="6" service_games_played="10" first_ret_point_won="15" first_ret_point_total="46" sec_ret_point_won="14" sec_ret_point="21" break_ret_point_won="2" break_ret_total="8" return_games_played="10" total_service_points_won="37" total_service_points_total="61" total_return_points_won="29" total_return_points_total="67" total_points_won="66" total_points="128"/> </double> </matchstatistics> <set set_id="352608" score_A="6" score_B="4" tiebreakscore_A="" tiebreakscore_B="" start_date="" start_time="" end_date="" end_time="" last_updated="2016-03-06 12:32:41"/> <set set_id="352609" score_A="4" score_B="6" tiebreakscore_A="" tiebreakscore_B="" start_date="" start_time="" end_date="" end_time="" last_updated="2016-03-06 12:32:41"/> <set set_id="352610" score_A="7" score_B="10" tiebreakscore_A="" tiebreakscore_B="" start_date="" start_time="" end_date="" end_time="" last_updated="2016-03-06 12:32:41"/> </match> </round></test>'; $matches = simplexml_load_string($xml); foreach ($matches->xpath('//round') as $roundData) { foreach ($roundData->match as $matchData) { foreach ( $matchData->matchstatistics->double as $double ) { echo (string) $double->statistics['first_srv_point_won'], " First Serve Points Won\n"; } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 27
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 27
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 25
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 25
Branch analysis from position: 13
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 23
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 23
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 25
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/ERjID
function name:  (null)
number of ops:  29
compiled vars:  !0 = $xml, !1 = $matches, !2 = $roundData, !3 = $matchData, !4 = $double
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Ctest%3E%0A%3Cround+round_id%3D%2221402%22+title%3D%22Final%22+start_date%3D%222016-03-06%22%0A+++++end_date%3D%222016-03-06%22+scoringsystem%3D%22BO3%22+groups%3D%220%22+ties%3D%220%22%0A+++++ordermethod%3D%221%22+prize_money%3D%226400%22+prize_currency%3D%22usd%22%0A+++++last_updated%3D%222016-03-06+12%3A32%3A41%22%3E%0A%0A+++++%3Cmatch+match_id%3D%22154374%22+official_start_date%3D%222016-03-06%22+official_start_time%3D%2208%3A00%3A00%22+actual_start_date%3D%22%22+actual_start_time%3D%22%22+winner%3D%22B%22+score_A%3D%221%22+score_B%3D%222%22+status%3D%22Played%22+drawposition%3D%221%22+person_A_id%3D%22%22+person_A_name%3D%22%22+person_A_country%3D%22%22+person_B_id%3D%22%22+person_B_name%3D%22%22+person_B_country%3D%22%22+double_A_id%3D%2215014%22+double_A_country%3D%22%22+person_A1_id%3D%2227475%22+person_A1_name%3D%22Liang+Chen%22+person_A1_country%3D%22CHN%22+person_A2_id%3D%2229558%22+person_A2_name%3D%22Wang+Yafan%22+person_A2_country%3D%22CHN%22+double_B_id%3D%2217263%22+double_B_country%3D%22%22+person_B1_id%3D%2227351%22+person_B1_name%3D%22V.+Wongteanchai%22+person_B1_country%3D%22THA%22+person_B2_id%3D%2230339%22+person_B2_name%3D%22Yang+Zhaoxuan%22+person_B2_country%3D%22CHN%22+last_updated%3D%222016-03-06+12%3A32%3A41%22+time_unknown%3D%22no%22%3E%0A+++++++%3Cmatchstatistics%3E%0A+++++++++%3Cdouble+double_id%3D%2215014%22+name%3D%22Liang+Chen+%2F+Wang+Yafan%22%3E%0A+++++++++++%3Cstatistics+aces%3D%221%22+dbl_faults%3D%223%22+first_srv_point_won%3D%2231%22+++first_srv_point_total%3D%2246%22+sec_srv_point_won%3D%227%22+sec_srv%3D%2221%22+break_point_won%3D%226%22+break_point_total%3D%228%22+service_games_played%3D%2210%22+first_ret_point_won%3D%2213%22+first_ret_point_total%3D%2242%22+sec_ret_point_won%3D%2211%22+sec_ret_point%3D%2219%22+break_ret_point_won%3D%222%22+break_ret_total%3D%226%22+return_games_played%3D%2210%22+total_service_points_won%3D%2238%22+total_service_points_total%3D%2267%22+total_return_points_won%3D%2224%22+total_return_points_total%3D%2261%22+total_points_won%3D%2262%22+total_points%3D%22128%22%2F%3E%0A+++++++++%3C%2Fdouble%3E%0A+++++++++%3Cdouble+double_id%3D%2217263%22+name%3D%22V.+Wongteanchai+%2F+Yang+Zhaoxuan%22%3E%0A++++++++++++%3Cstatistics+aces%3D%221%22+dbl_faults%3D%222%22+first_srv_point_won%3D%2229%22+first_srv_point_total%3D%2242%22+sec_srv_point_won%3D%228%22+sec_srv%3D%2219%22+break_point_won%3D%224%22+break_point_total%3D%226%22+service_games_played%3D%2210%22+first_ret_point_won%3D%2215%22+first_ret_point_total%3D%2246%22+sec_ret_point_won%3D%2214%22+sec_ret_point%3D%2221%22+break_ret_point_won%3D%222%22+break_ret_total%3D%228%22+return_games_played%3D%2210%22+total_service_points_won%3D%2237%22+total_service_points_total%3D%2261%22+total_return_points_won%3D%2229%22+total_return_points_total%3D%2267%22+total_points_won%3D%2266%22+total_points%3D%22128%22%2F%3E%0A+++++++++%3C%2Fdouble%3E%0A+++++++%3C%2Fmatchstatistics%3E%0A+++++++%3Cset+set_id%3D%22352608%22+score_A%3D%226%22+score_B%3D%224%22+tiebreakscore_A%3D%22%22+tiebreakscore_B%3D%22%22+start_date%3D%22%22+start_time%3D%22%22+end_date%3D%22%22+end_time%3D%22%22+last_updated%3D%222016-03-06+12%3A32%3A41%22%2F%3E%0A+++++++%3Cset+set_id%3D%22352609%22+score_A%3D%224%22+score_B%3D%226%22+tiebreakscore_A%3D%22%22+tiebreakscore_B%3D%22%22+start_date%3D%22%22+start_time%3D%22%22+end_date%3D%22%22+end_time%3D%22%22+last_updated%3D%222016-03-06+12%3A32%3A41%22%2F%3E%0A+++++++%3Cset+set_id%3D%22352610%22+score_A%3D%227%22+score_B%3D%2210%22+tiebreakscore_A%3D%22%22+tiebreakscore_B%3D%22%22+start_date%3D%22%22+start_time%3D%22%22+end_date%3D%22%22+end_time%3D%22%22+last_updated%3D%222016-03-06+12%3A32%3A41%22%2F%3E%0A++++%3C%2Fmatch%3E+%0A%3C%2Fround%3E%3C%2Ftest%3E'
   24     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
   27     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2F%2Fround'
          7        DO_FCALL                                      0  $8      
          8      > FE_RESET_R                                       $9      $8, ->27
          9    > > FE_FETCH_R                                               $9, !2, ->27
   28    10    >   FETCH_OBJ_R                                      ~10     !2, 'match'
         11      > FE_RESET_R                                       $11     ~10, ->25
         12    > > FE_FETCH_R                                               $11, !3, ->25
   29    13    >   FETCH_OBJ_R                                      ~12     !3, 'matchstatistics'
         14        FETCH_OBJ_R                                      ~13     ~12, 'double'
         15      > FE_RESET_R                                       $14     ~13, ->23
         16    > > FE_FETCH_R                                               $14, !4, ->23
   30    17    >   FETCH_OBJ_R                                      ~15     !4, 'statistics'
         18        FETCH_DIM_R                                      ~16     ~15, 'first_srv_point_won'
         19        CAST                                          6  ~17     ~16
         20        ECHO                                                     ~17
         21        ECHO                                                     '+First+Serve+Points+Won%0A'
   29    22      > JMP                                                      ->16
         23    >   FE_FREE                                                  $14
   28    24      > JMP                                                      ->12
         25    >   FE_FREE                                                  $11
   27    26      > JMP                                                      ->9
         27    >   FE_FREE                                                  $9
   33    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
127.16 ms | 1405 KiB | 15 Q