logs archiveIRC Archive / Freenode / #php / 2015 / August / 27 / 1
AcidReign
runinsquares: sure, that's a basic iterator...
hanshenrik
http://php.net/manual/en/function.gzfile.php does not tell wether or not the newline is actually added to the array elements. such as its file() counterpart does by default. i guess that's a documentation bug? :p
(and as a result, i don't know the answer)
Alphos
hanshenrik !+tias
php-bot
hanshenrik, [TIAS] Try It And See. If you want to know if or how something works, try it first. "Testing Is Absolutely Simple"
hanshenrik
Alphos, i will, though there will be some time before this code is ready for testing
(it will handle both cases though)
Alphos
hanshenrik just gzip a file with "a\nb" in it, gzfile() it, and see what it gives you
NanoSector
If I use a try{ ... }catch(\Exception $e) { ... }, PHP still complains that the exception is uncaught
Or does call_user_func not allow you to catch exceptions?
sorabji
NanoSector: reproduce it please? http://codepad.viper-7.com/
NanoSector
Sure
         

hanshenrik
http://codepad.viper-7.com/eQ1hbA
seems it does include newlines
Siente
Hello guys, good evening If I have never used ORM can I learn it with Doctrine ORM?
hanshenrik
(why the weird stream_get_meta_data code? cause i can't create normal files, but tmpfile() can create files, for some reason.)
( Viper-7 should know why)
NanoSector
funny, it works there
http://codepad.viper-7.com/98GbP0
hanshenrik
Alphos, mind documenting that? :p
sorabji
NanoSector: what's different in your code then?
NanoSector
sorabji, I have no clue
hang on
Alphos
hanshenrik : i don't have any more access to editing the documentation than you
hanshenrik
bleh
Alphos
NanoSector sure you caught \Exception ?
NanoSector
hanshenrik
fine
ill do it
sorabji
lol
Siente: Doctrine ORM is an ORM, yes.
Siente
yes I know
but If I want to learn ORM should I use a framework?
Alphos
sorabji weird ! where did they get that name from ?
sorabji
Siente: no, you should use an ORM...
NanoSector
Alphos, that pastebin is the code I have now
rpad
I want to register a stream wrapper as an alias of another wrapper. Is that possible?
Siente
but I mean can I learn ORM If I use doctrine ORM? :D
sorabji
Siente: ORM is not a singular thing.
you will learn Doctrine's ORM if you use Doctrine
         

Siente
I mean should I create my own ORM tools
sorabji
no, definitely don't do that
Siente
so which ORM framework would you recommend me to learn and use?
Alphos
Siente !+recommend
php-bot
Siente, No, we cannot recommend <whatever you asked about>. We're here to help you write PHP code, not spend hours arguing the relative merits of A versus B. We won't recommend packages, libraries, scripts, sites, languages, version control systems, or sports teams; our only recommendation is that you please take your recommendations questions elsewhere (e.g., https://softwarerecs.stackexchange.com/)
sorabji
library, not framework
hanshenrik
wowowow
Alphos
+1 on library, an ORM isn't a complete framework
hanshenrik
wtf
Siente
okay
hanshenrik
gzfile() converts empty lines to spaces?
o.0
Alphos
Siente : just pick one
hanshenrik
is it supposed to do that?
Alphos
hanshenrik how did you check that ?
hanshenrik
http://codepad.viper-7.com/eMOgK9
sorabji
Siente: you can do a lot worse than doctrine
hanshenrik
oh no
its just weird html representation
Alphos
hanshenrik : your browser did that. LF is considered whitespace, and your browser considers all whitespace to be a single space
hanshenrik
its not really spaces
NanoSector
Alphos, I suck, was looking at the wrong class
Alphos
NanoSector heh
Majeh
Siente if i'm not mistaken, we php guys have Doctrine, Propel and Eloquent at our disposal so you can look up those 3 and check which one fits you best
sorabji
o there's so many more than that
everyone writes an orm
Majeh
that's why i said "if i'm not mistaken" :)
sorabji
so you knew you were mistaken?
:D
Majeh
i assumed
evidently :p
Siente
okay thanks , btw why should I use ORM?
Alphos
sorabji he wasn't mistaken
Siente
are you using ORM guys?
znf
Not sure if it's as simple as this - but what's faster? php-fpm or apache's mod_php?
Majeh
Siente you use an ORM so you don't reinvent the wheel all the time
Alphos
we do have these three. we have others, but we do indeed have these three
Majeh
znf php-fpm
hands down
no need to even check
sorabji
Alphos: touche
znf
I'm getting weird results here http://i.imgur.com/OdaWdcE.png
I was expecting nginx+spdy+php-fpm to be faster loading the same website
Majeh
znf you're transferring js and other file types
Siente
Majeh, what do you mean by so you don't reinvent the wheel all the time
Alphos
znf : do you have some gzipping involved in the nginx side ?
znf
Alphos, gzip is enabled in both servers
Alphos
znf : weird discrepancy in size then
znf
Majeh, yes, but look at DOMContentLoaded
hanshenrik
foreach($lines_arr as $key=>&$line){$line=trim($line);if(0===strlen($line)){unset($lines_arr[$key]);}}
can i unset stuff in array's im currently forEach'ing, safely? :o
Majeh
Siente it means that some other guys had the same problem you had (pull the data from a db, use in app through a common interface). you probably had the problem, you might have solved it but most likely you didn't cover all scenarios
znf
Oh, wait. Actually on apache, mod_gzip doesn't seem to be active
Alphos
znf : if you set your concurrency lower on nginx, guess what, it will serve less files at the same time
znf : and gzipping takes time
znf now, you know
znf
Alphos, I think that defeats the purpose of SPDY :P
Majeh
using an ORM that's supported and in development means that it's alive project and that some (potentially smart) people are working on it to resolv common problems
Alphos
znf : can't prevent people from doing stupid things
Majeh
isn't spdy useless when we have http 2.0 knockng on the door?
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 next »