Blog

Comments for Jean-Michel Feurprier http://blog.jmfeurprier.com LAMP Web Developer Wed, 16 Mar 2011 13:53:48 +0000 http://wordpress.org/?v=2.9.1 hourly 1 Comment on method_exists() vs. is_callable() by dbind http://blog.jmfeurprier.com/2010/01/03/method_exists-vs-is_callable/comment-page-1/#comment-2980 dbind Wed, 16 Mar 2011 13:53:48 +0000 http://blog.jmfeurprier.com/2010/01/03/method_exists-vs-is_callable/#comment-2980 @mdomba, it depends on what you're attempting. 1. If you just want to make sure you can call it, use is_callable. If you need to make sure that the method exists by that name (meaning it's not callable just through a magic method) then use both. 2. If you just want to know if the method exists, not caring whether you can call it at that point, then method_exists alone is enough. 3. If you want to call the method and you don't care why or how it's callable, but just that it is, then use is_callable alone. Just notice the purpose of each: is_callable tells you whether calling it will abort the script with an error, while method_exists tells you if that method was actually hard-coded in a particular class, not caring if it's gonna explode in your face when you try to call it. @mdomba, it depends on what you’re attempting.

1. If you just want to make sure you can call it, use is_callable. If you need to make sure that the method exists by that name (meaning it’s not callable just through a magic method) then use both.

2. If you just want to know if the method exists, not caring whether you can call it at that point, then method_exists alone is enough.

3. If you want to call the method and you don’t care why or how it’s callable, but just that it is, then use is_callable alone.

Just notice the purpose of each: is_callable tells you whether calling it will abort the script with an error, while method_exists tells you if that method was actually hard-coded in a particular class, not caring if it’s gonna explode in your face when you try to call it.

]]>
Comment on SVN trunk, branches and tags by What do “branch”, “tag” and “trunk” really mean in SVN ? « Beyond-M http://blog.jmfeurprier.com/2010/02/08/svn-trunk-branches-and-tags/comment-page-1/#comment-2940 What do “branch”, “tag” and “trunk” really mean in SVN ? « Beyond-M Tue, 15 Mar 2011 05:50:54 +0000 http://blog.jmfeurprier.com/?p=258#comment-2940 [...] http://blog.jmfeurprier.com/2010/02/08/svn-trunk-branches-and-tags/ March 15th, 2011 | Tags: Folder Layout, SVN, Tree | Category: Codes [...] [...] http://blog.jmfeurprier.com/2010/02/08/svn-trunk-branches-and-tags/ March 15th, 2011 | Tags: Folder Layout, SVN, Tree | Category: Codes [...]

]]>
Comment on method_exists() vs. is_callable() by mdomba http://blog.jmfeurprier.com/2010/01/03/method_exists-vs-is_callable/comment-page-1/#comment-2482 mdomba Wed, 16 Feb 2011 09:49:06 +0000 http://blog.jmfeurprier.com/2010/01/03/method_exists-vs-is_callable/#comment-2482 So to be sure for all situations... the best usage would be... if method_exist(...) && is_callable(...) So to be sure for all situations… the best usage would be…

if method_exist(…) && is_callable(…)

]]>
Comment on SVN trunk, branches and tags by Anonymous http://blog.jmfeurprier.com/2010/02/08/svn-trunk-branches-and-tags/comment-page-1/#comment-2384 Anonymous Tue, 08 Feb 2011 10:52:21 +0000 http://blog.jmfeurprier.com/?p=258#comment-2384 [...] read the whole article here [...] [...] read the whole article here [...]

]]>
Comment on SVN trunk, branches and tags by ali http://blog.jmfeurprier.com/2010/02/08/svn-trunk-branches-and-tags/comment-page-1/#comment-1922 ali Wed, 12 Jan 2011 06:45:16 +0000 http://blog.jmfeurprier.com/?p=258#comment-1922 Nice article.It explained the concept clearly. Nice article.It explained the concept clearly.

]]>
Comment on SVN trunk, branches and tags by Orlando Reyes http://blog.jmfeurprier.com/2010/02/08/svn-trunk-branches-and-tags/comment-page-1/#comment-1509 Orlando Reyes Wed, 15 Dec 2010 19:41:29 +0000 http://blog.jmfeurprier.com/?p=258#comment-1509 Excellent!!, A chapter of of a book in few words. Excellent!!, A chapter of of a book in few words.

]]>
Comment on SVN trunk, branches and tags by Siva http://blog.jmfeurprier.com/2010/02/08/svn-trunk-branches-and-tags/comment-page-1/#comment-1077 Siva Wed, 03 Nov 2010 15:21:24 +0000 http://blog.jmfeurprier.com/?p=258#comment-1077 Nice article.It would be helpful if there are some diagrams of the svn repository showing branch tag and trunk Nice article.It would be helpful if there are some diagrams of the svn repository showing branch tag and trunk

]]>
Comment on SVN trunk, branches and tags by zmicer http://blog.jmfeurprier.com/2010/02/08/svn-trunk-branches-and-tags/comment-page-1/#comment-782 zmicer Thu, 26 Aug 2010 08:02:19 +0000 http://blog.jmfeurprier.com/?p=258#comment-782 Thanks for this post. It really covers what happens in every day development life. It is good ii is so short and human understandable. Nice work. Thanks for this post. It really covers what happens in every day development life. It is good ii is so short and human understandable. Nice work.

]]>
Comment on SVN trunk, branches and tags by Nate http://blog.jmfeurprier.com/2010/02/08/svn-trunk-branches-and-tags/comment-page-1/#comment-779 Nate Wed, 25 Aug 2010 17:04:00 +0000 http://blog.jmfeurprier.com/?p=258#comment-779 I am just starting with SVN and this is just what I need at this stage. I am a little unclear as to what your criteria for establishing a new trunk might be. I am just starting with SVN and this is just what I need at this stage. I am a little unclear as to what your criteria for establishing a new trunk might be.

]]>
Comment on SVN trunk, branches and tags by error fix http://blog.jmfeurprier.com/2010/02/08/svn-trunk-branches-and-tags/comment-page-1/#comment-760 error fix Mon, 16 Aug 2010 12:03:46 +0000 http://blog.jmfeurprier.com/?p=258#comment-760 because a little bit hard to configure the CI server to manage all development branches. because a little bit hard to configure the CI server to manage all development branches.

]]>