Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 5.2 compatibility for including CMB2 #129

Merged
merged 2 commits into from
Dec 23, 2014
Merged

PHP 5.2 compatibility for including CMB2 #129

merged 2 commits into from
Dec 23, 2014

Conversation

bryceadams
Copy link
Contributor

closes #128

@jtsternberg
Copy link
Member

Hey, let's just use dirname( __FILE__ ) and not __DIR__ at all. That will save on confusion for what is supposed to be just an example file.

@bryceadams
Copy link
Contributor Author

@jtsternberg you sure? I did it like this because __DIR__ is meant to be faster as it's evaluated at compile-time rather than execution-time (like dirname( __FILE__ )). ref: http://stackoverflow.com/questions/2749416/is-there-any-difference-between-dir-and-dirname-file-in-php

@jtsternberg
Copy link
Member

I'm sure, but thank you for your consideration. This is meant to be an example file to demo CMB2. The confusion for some of the low-level users is not worth the micro-savings. By all means, use __DIR__ in your own projects.

@bryceadams
Copy link
Contributor Author

OK sure no prob :-) will fix up first thing in the morning. Thanks for your great work on it!

Best,Bryce

On Mon, Dec 22, 2014 at 10:24 PM, Justin Sternberg
notifications@github.com wrote:

I'm sure, but thank you for your consideration. This is meant to be an example file to demo CMB2. The confusion for some of the low-level users is not worth the micro-savings. By all means, use __DIR__ in your own projects.

Reply to this email directly or view it on GitHub:
#129 (comment)

@bryceadams
Copy link
Contributor Author

@jtsternberg there you go :)

jtsternberg added a commit that referenced this pull request Dec 23, 2014
PHP 5.2 compatibility for including CMB2. Props @bryceadams.
@jtsternberg jtsternberg merged commit 8f30fe7 into CMB2:master Dec 23, 2014
@jtsternberg
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants