Provide general php executor function that handled the boilerplate conversion between Ruby and PHP. Add a new verb to the DSL.
i = php <<-END, :var1 => 1, :var2 => [3,2,1,4]
foreach($var2 as $i => $v) {
if ( $var1 == $v ) {
return $i;
}
}
END
# i is now 2
Also provide a php_locally for a local executing version. Currently php is executed via drush exec, which will probably stay the same. Replace all current instances in the code where we execute php with calls to the php functions.
Provide general php executor function that handled the boilerplate conversion between Ruby and PHP. Add a new verb to the DSL.
Also provide a
php_locally
for a local executing version. Currently php is executed via drush exec, which will probably stay the same. Replace all current instances in the code where we execute php with calls to thephp
functions.