How can I retrieve parameters from the path? I have a path 

 /step/4?guide=6


How can I get parameters 'guide' and '6'in PHP?
If this is Drupal 8, you can simply do:

$foo = \Drupal::request()-&gt;get('guide');