Skip to content

Instantly share code, notes, and snippets.

@miguelcma
Forked from cirpo/gist:4760759
Created March 6, 2013 01:33
Show Gist options
  • Save miguelcma/5096003 to your computer and use it in GitHub Desktop.
Save miguelcma/5096003 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