Due to security reasons, php filter module has been removed from Drupal 8. Thus It becomes very difficult to add php scripts in blocks and nodes without editing templates. To overcome this problem we have created our own module and pushed it as sandbox project in Drupal.org
Php Shortcode - This modules provides shortcode option to execute php scripts inside blocks and nodes.
Dependencies:- Shortcode module
Project URL:- https://www.drupal.org/sandbox/niyas/2780793