3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $variable_name = 'field_bundle_settings_my_type__my_field__name'; $name = str_replace('field_bundle_settings_', '', $variable_name); $entity_type = substr($name, 0, strpos($name, '__')); $bundle = substr($name, strpos($name, '__') + 2); print $entity_type . "\n"; print $bundle;
based on Wiorv
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
my_type my_field__name
Output for hhvm-3.10.0

Process exited with code 153.