logs archiveIRC Archive / Freenode / #php / 2015 / September / 20 / 1
Alphos
pre-commit is before :p
post-commit hooks are only good to push new tags :)
laszlof
Alphos: http://pastebin.com/B9Hgmk82
Alphos: well, I mean in the pipeline where its already been issued a commit.
Alphos
;)
laszlof
morfin: no
? in sed is literal
mentoc
Just stop using short tags from here on out
laszlof
and $ is the regex for end of line
tw2113
boo short tags
down with <?
Bad_Advice_Cat
izham, wait. Upgrade PHP first, then I can give you an idea on safe way to change <? to <?php
Alphos
+1
and +1 to Bad_Advice_Cat too
         

laszlof
thats good advice
cat
izham
:P you insist on upgrade ahahaha
btw,. got another prob..
laszlof
yes, you're using a version of php that is no longer supported
izham
[client 127.0.0.1] PHP Fatal error: Call to a member function children() on a non-object in
hmmm..
laszlof
and hasnt been supported in a long time
izham
i'll propose first.. i cant do it by my self right now.. i can upgrade but not without discussion with colleauge
Bad_Advice_Cat
izham, where is your colleague? In your bed? o_O
izham
no hahaha
will meet them at office on monday of course
morfin
i think i should test how big memory footprint will become if i use many DOMNode/DOMNodeList
mentoc
morfin: how would you test that?
izham
any idae why that fatal erros occured? : PHP Fatal error: Call to a member function
:P
mentoc
izham: what's the full error?
Alphos
izham someone called a method on what they expected to be an object, but in fact wasn't
foo
What is wrong with this? $updates[2]->items:protected ... when I print_r() ,the next thing I see is [items:protected], but I'm not sure how to access it
eg. print_r($updates[2])
mentoc
foo: protected members can only be accessed by the class that declares it and the inheriting class
Alphos
foo it's a protected property called "items", you can't access it from outside your class unless you have a getter
foo
Alphos: thakn you
Bad_Advice_Cat
izham, get that person on the phone :+)
morfin
i want to simulate real conditions - generate lots of data into database(like 10000-100000 rows) query data from that database, then generate 3 XML files with structure similar to XLSX(one workbook, one worksheet and sharedStrings.xml)
Alphos
s/on the phone/fired/
morfin 100k rows is not "lots"
         

morfin
i know
Alphos
though a 100k-element xml is impractical :/
laszlof
that will probably crash excel
morfin
no
laszlof
isnt it limited to 65K rows?
morfin
XLSX is not
XLS can have > 65K rows but seems like Excel just ignore them
laszlof
have fun with that
Alphos
then what's the point of the exercise ?
"ohai, i want something that'll crush 35k rows of data, YOLO"
laszlof
you forgot the hashtag
#YOLO
foo
mentoc / Alphos: So I can't just do print_r($array), see this: http://screencast.com/t/PtIxZ3aPmZO and access it, right? Or is the answer in here somewhere? Been doing PHP for so long but haven't ventured in this area. Thanks
laszlof
foo: var_dump
morfin
i want generate XLSX which have such table
also you forgot one thing
sharedStrings can store unique strings only
Alphos
foo : it's a protected property, you can't access it from the outside, that's kinda the point of non-public properties
foo
laszlof: eg. I want to echo $update_id http://screencast.com/t/o4n4TEmSbZ
well, it's not update_id, but I think you get the point
mod
Alphos, per your question: symfony :)
Alphos
foo : can't be done with a protected property unless you have a getter
mod : meh...
morfin
Alphos, Excel did not crash for me even with 500000 rows btw )
foo
Alphos: got it, I'll look at the docs for a getter.
morfin
but it used sh*tloads of memory
Alphos
morfin if it discards data, it's absurd
foo
Alphos: I'm assuming this exists somewhere within this library I'm trying to figure out ( https://core.telegram.org/bots/api#getupdates )
morfin
it discards only for old(2003) format
laszlof
foo: just write a method in that class (or its child class), public function getUpdateId() { return $this->update_id; }
or omething like that
morfin
for new(XLSX) it will display everything
Alphos
foo !+g10
php-bot
foo, Guideline #10) We don't support script(s). We help you *write* PHP, not recommend or download and install/hack/modify/adapt/use pre-written scripts or third party APIs. Contact the authors of the script for support options they provide.
Alphos
morfin [22:32:25] <Alphos> though a 100k-element xml is impractical :/
foo
Alphos: got it, thank you
mod
Alphos, anti-framework or just anti-symfony? heh
tw2113
anti-anti
mod
Frameworks are like culture: it will always happen
Alphos
mod : no, i'm just saying having 100k-xml "because symfony can handle them" is preposterous
i never used symfony, i don't criticize what i haven't used myself :)
(been meaning to get on to it though)
mod
i dunno about 100k, but I hate XML. Yaml :)
Alphos
(i just lack the motivation since i don't have anything to use it for)
mod 100k calls for a db anyway
mod
yeah, i hear ya
Alphos
not having a job sucks :/
thank god i'm a quick study, except when migraine kicks in >_<
mod
ah, yes it does
they get better as you get older
Alphos
(in which case i have trouble adding 1 and 2)
mod in the past 6 months, they've only gotten worse, with the last one lasting for close to three weeks, pretty much non-stop
still in the "aftermath" right now, bit of one earlier tonight, intense but short
thomedy
heres a quesiton... i want to extent a class because of proper oop design.... but its going to require an include or require once... but if im only extending a couple functions from the base class... is it more efficient to just write the functions every time i make the object or make the object
probably a require is faster
tw2113
write the functions every time?
not following on that one
laszlof
that completely depends on what the parent class odes, and what the child class does
if they arent explicitly related, you probably shouldnt extend it
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 next »