Skip to content

Instantly share code, notes, and snippets.

@rpayanm
Last active July 16, 2019 13:13
Show Gist options
  • Save rpayanm/c825a24a84e24b8e1a2a0676b8d58ee6 to your computer and use it in GitHub Desktop.
Save rpayanm/c825a24a84e24b8e1a2a0676b8d58ee6 to your computer and use it in GitHub Desktop.
<?php
$query_string = preg_replace('/\}|\{/', '', $query->__toString());
$arguments = $query->arguments();
foreach ($arguments as $key => $val) {
$arguments[$key] = '\'' . $val . '\'';
}
$result_query = strtr($query_string, $arguments);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment