Skip to content

Instantly share code, notes, and snippets.

@cirpo
Last active December 12, 2015 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cirpo/4760759 to your computer and use it in GitHub Desktop.
Save cirpo/4760759 to your computer and use it in GitHub Desktop.
<?php
if (in_array($name, array_keys($this->calls))) {
if ($this->$name($data)) {
return $this->dialIn($name, $data);
}
} else {
return "Non-existent call";
}
<?php
if (!in_array($name, array_keys($this->calls)) || !$this->$name($data)) {
return "Non-existent call";
}
return $this->dialIn($name, $data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment