« first day (1778 days earlier)      last day (3170 days later) » 

11:00 AM
@tereško can I remove the last row in PDOStatement ?
 
no
 
I think I'm force to use IF () statement
 
you can use have fetchRow() and $x < 15 both in the while() condition
.. which proper use of parenthesis, of course
what you need to do is just retrieve only the first 15 results
 
@tereško yes exactly I need to this
 
..well .. I already told you how\
 
11:03 AM
I will try
 
now figure out the exact code
 
fetchRow() is the same with fetch() ?
 
Hi guys
 
HI.
@Sajad fetch() is a method which fetches all the results matching the query.
 
@HassanAlthaf I see
@tereško this order it fine ?
$sth = $dbh->prepare()
$sth->execute();
$sth->rowCount();
$sth->fetchRow();
I mean is both execute() and fetchRow() is fine ?
 
11:20 AM
@Sajad $result = $sth->fetch();
 
@HassanAlthaf in this case all rows will be printed, I need to just 15 first rows
all are 16 rows
 
If you have added LIMIT 15 then it will return only 15 rows.
 
I added LIMIT 16, because I need to know, should I create a "see more" button or not
 
Oh.
Do this then:
Once you execute:
$seeMoreButton = false;

if ($sth->rowCount() > 15) {
    $seeMoreButton = true;
}
And then, in that if condition, unset the last
well
while you're fetching,
no wait, you can do this then:
 
how unset the last ?
 
11:26 AM
$result = $sth->fetch(PDO::FETCH_ASSOC);
$thingsToShow = [];

for ($iterator = 0; $iterator < 16; $iterator ++) {
    $thingsToShow[] = $result[$iterator];
}
That will only take out 15 elements for you.
 
yes, it works
 
Congrats then. :P
 
tnx
 
@HassanAlthaf but one thins, can I use both condition and assignment in the while(){} ?
like this:
while ($end = $sth->fetchRows() < 16) {}
 
11:29 AM
You have to use ternanary operators
But I don't think what you're saying is possible.
 
ok
@tereško I searched, PDO has not fetchRow()
 
@rdlowrey Your event loop, why do you make it use polling? Why not interrupt-driven? Did you ever look into that?
 
@Sajad sorry, my mistake. It's just fetch()
 
@Sajad if you insist on cramming multiple lines into one, make sure to specify precedence carefully: while (($end = $sth->fetchRows()) < 16) {}
 
though, you should have known what I meant (if you understood what PDOStatement methods do)
 
11:38 AM
not saying that's how you use fetchRows API, commenting on your assigning a boolean to $end
 
user895378
@Jimbo because windows
 
Screw LibUV
 
user895378
No way to do it in userland without extensions
 
Nobody does anything decent on windows
Any other reasons?
 
user895378
Because the underlying extensions do that for me?
 
11:38 AM
@tereško you are really pro, when you say something, and I search about it, and I can not find nothing, still I think there is a point.
 
user895378
e.g. libevent uses interrupts
 
user895378
But I can provide the same API regardless of extension environment or OS with the current approach and that's valuable
 
So, without lib event it's polling, then when you introduce libev or lib event it becomes Interrupt driven?
That's really awesome :)
 
user895378
@Jimbo Describe what you mean by "polling" because I think you may be possibly confusing what really goes on under the hood
 
user895378
Because it's not polling in the sense of "busy waiting"
 
11:40 AM
stream_select() is some type of polling though…
 
1
Q: Doesnt dependency injection hurt SRP?

John Smithgiven a class: class Cart { private $items; public function add (Product $item) { $this->items[] = $item; } public function clear() { $this->items = array(); } } this is just cool. But for testing, lets make a possibility to change the items: clas...

 
you mean bsd socket programs on windows? come on, how can you pin that on windows
 
user895378
right, but no CPU activity is actually needed unless there's IO activity or a timer ready to trigger ...
 
@rdlowrey Polling as in, in userland you check to see if something needs to be done
?
 
windows has a list of efficient network notification mechanism
 
11:40 AM
@DougGale syntax error ..!
 
user895378
@DougGale let me rephrase: php userland has no support for those tools in windows
 
ah ok
now I see your point
 
Where as with interrupts, there's just a flag check. Perhaps I'm way out, perhaps I'm warm :)
 
Windows is a victim of ebola.
 
@Jimbo sure, but stream_select() has a timeout… which we can set to like one second [or to whenever the next event is scheduled to happen e.g. timers].
 
11:41 AM
someone needs to port the relevant stuff to be native windows
 
user895378
@Jimbo Yes, but we're only waiting on the poll if there's nothing else that needs to occur. So it's not preventing anything else from running
 
user895378
we only ever poll for a maximum of time until the next timer event is scheduled to trigger
 
user895378
So in practice it behaves exactly the same way as an interrupt scheduler
 
@rdlowrey Of course, I'm thinking about the difference in microseconds here
 
user895378
@Jimbo no userland php application needs to think in terms of microseconds
 
11:43 AM
But I'm sure is important for the big c10k
 
user895378
millisecond resolution is enough
 
user895378
@Jimbo it's not
 
user895378
even node limits you to milliseconds
 
@rdlowrey Why advocate installing LibEvent/Ev then? does it provide something else?
 
user895378
@Jimbo I don't actually. libuv and libev are both superior to libevent
 
11:43 AM
if you aren't careful, it'll be a c10 problem, not a c10k problem :D
 
lol
 
user895378
@Jimbo ev is more performant than libevent but it's only available on real OSs. libuv provides a unified api across real operating systems as well as windows
 
user895378
ev is like the next evolution past libevent
 
user895378
fwiw I've had no problem handling 20,000 simultaneous users in my server with the current approach on a single machine.
 
So it's all just stream_select()s. Pay no attention to the man behind the curtain
 
user895378
11:45 AM
@Jimbo well the extensions like libevent/ev/uv expose more sophisticated polling mechanisms like epoll/kqueue/etc
 
user895378
but for our purpose it works the same way. those better algorithms are just more performant for a higher number of file descriptors than select() which is O(n) and starts to suffer under load
 
@rdlowrey Yeah I read that, I was trying to see where they state it also provides interrupt capabilities (rather like PCNTL ext in my mind), but can't find anything
 
if something actually happens, then a syscall is worthwhile. if nothing happens a million times that is a problem
 
user895378
@Jimbo in practice this is transparent to the application anyway. libevent masks signals while you're in the midst of a callback anyway -- this leads to the same behavior as the non-interrupt approach.
 
11:48 AM
@Abe Nice.
 
@rdlowrey Interesting stuff. I have no-one else to talk with about it. But if I'm right that it's initially polling but when LibEv / equivalent is installed it becomes interrupt, but all transparent to the user (so we don't see it happening, it's just more performant), then I'm happy
 
user895378
@Jimbo yeah that's all I'm trying to say. My goal was always just to expose the same API regardless and if you want to try to maximize perf you can just choose a different extension backend.
 
@tereško this is fine ?
$i= 0;
while (($end = $sth->fetch()) && $i < 15) { $i++; }
 
user895378
e.g. so you can use the same lib regardless of OS or extension environment for development and get basically the same result. Then just setup the environment how you want for production.
 
user895378
@Jimbo the benefit of libuv aside from windows compat is that it builds in async filesystem functionality whereas with ev or libevent you will also need pecl/eio to do filesystem things without blocking the event loop
 
11:55 AM
two condition in my while() :((
 
user895378
@Jimbo of course, the amphp/file lib hides that behind the same abstracted API as well just like the main amphp/amp repo
 
@rdlowrey Do these external, non-blocking libraries (that you use within the event loop to be async and not block), have to use something like LibEV to do their stuff asynchronously as well?
 
user895378
@Jimbo nope, they just use the existing amp abstractions.
 
user895378
With amp you never have to think about the backend.
 
I get that, I just want to understand what it's doing under the hood, generally interested
 
user895378
11:57 AM
@Jimbo well, they have to be non-blocking under the hood, so they have to accomplish that somehow
 
user895378
Generally your satellite libs will just use the same event loop abstraction and everything "just works"
 
user895378
So for example, if I want to create an async task dispatcher that works with pthreads I do something like this ...
 
user895378
1. create a pool of worker threads and establish a non-blocking socket connection to the main thread in each.
 
user895378
2. Dispatch tasks to whatever worker thread isn't currently in-use
 
user895378
3. When the task finishes the worker writes a single byte (or whatever) on its socket connection to the main thread
 
user895378
12:00 PM
4. Back in the main thread our socket IO watcher lets us know the task has finished and we use normal pthreads api to shift the result of the worker thread's queue
 
user895378
You just need a file descriptor that you can watch for IO read/write events and you can communicate with anything
 
user895378
So another example is how pecl/eio exposes a eio_get_event_stream() us3.php.net/manual/en/function.eio-get-event-stream.php
 
user895378
we just get that stream and we can watch it for IO events to know when filesystem tasks have completed
 
user895378
The same thing can be done for a pool of persistent worker processes to dispatch work to them. You just need a pollable IO connection and everything can be accomplished without blocking the main thread
 
That's for File I/O, right?
 
user895378
12:02 PM
eio is, correct
 
user895378
filesystem IO is not non-blocking. It has to be faked with threads and this is what eio does for you.
 
Wow, didn't know that
@rdlowrey Imagine, though, that I'd like to write a library that can do something that works with Amp, that currently hasn't been created yet. Something like, an asynchronous RPC call (I don't know if there's something like that already so I just plucked it out of thin air, imagine it doesn't already exist yet). How would I go about writing something so it's not blocking when using these within the Event Loop?
 
user895378
you would have a simple socket server (can use unix domain socket or tcp if in windows). Then use proc_open() to create the worker processes. You probably would just pass the address to your main process's socket server in the command when starting the workers.
 
user895378
The first thing the workers do upon starting is connect to that main server.
 
user895378
Then they just watch the socket connection for readability.
 
user895378
12:06 PM
The main process is responsible for sending tasks to the workers. So you would e.g. serialize function names and args (or however you want to do it) and the workers receive those commands, execute them, then serialize and write the results back to the main process.
 
Wow, all of that external to the event loop
 
user895378
Well it still happens inside the event loop
 
user895378
But this is something I'm actually going to implement myself sooner rather than later
 
I meant all that as an external library, just so I can then use it within the event loop. It's a lot of work :)
 
user895378
Yeah it is, that's why we've been slowly creating libs to do all these things.
 
12:08 PM
Imagine you wanted to make (god forbid) MySQL 'async', and didn't want to use PostgreSQL, bear with me. You'd have to use Pthreads basically wouldn't you?
 
user895378
@Jimbo nope. @bwoebi has already created an async amphp/mysql lib
 
Okay, imagine that wasn't created :D just for a second
I am going somewhere with this
 
user895378
You wouldn't be forced to use pthreads, no.
 
grrr ....
 
Shhh Joe just for interests sake
What about if you could call a function within the event loop that takes a callable, and everything in that callable is then dispatched via pthreads automatically so the user could put any old code in there and it'd not block :D
 
12:10 PM
oh I wasn't reading that ...
 
Haha
 
user895378
@Jimbo define "couldn't put any old code in there"
 
user895378
Yes, btw, I've already created something that does this using pthreads -- It's just a year old and I have to update it to work with the newest version of the amp libs
 
user895378
From what I've seen you can now pass closures through to pthreads workers if I'm not mistaken too.
 
@rdlowrey A single function containing a mysql call, then a http call, then something that, I don't know, makes a call to a piece of hardware, and a command line call. You pass in that callable, fire and forget, the event loop uses pthreads to handle all this without blocking the event loop. May require a lot of logic / introspection or things
 
user895378
12:12 PM
@Jimbo the easiest way to do this is just to only use stateless functions
 
zend_object_properties_size() returning a negative number, wtf is going on ...
 
(Basically writing synchronous code that is automatically made 'async')
Hmm
 
user895378
@Jimbo right. This is a great use-case and is totally possible. I've done it before but just need to update the code.
 
user895378
With my existing solution you can specify pthreads workers in a custom way as well to keep persistent socket connections alive inside the worker, etc.
 
@Jimbo you could actually just use resolve(foo()) to let it execute in it's own "thread" as long as all the mysql, http and command line calls are async.
 
12:15 PM
@kelunik See, it requires those things to be async, and that's on the user to ensure - my thoughts revolved around passing in non-async things, but these would be dispatched via pthreads (like file I/O because it's blocking and there's no other way around it)
 
user895378
The catch is this: the async event libs like libevent/ev/php-uv can't cooexist with pthreads. So you're stuck using the native event loop implementation. This however is not a problem in real code unless you were hoping to use the thing in a super performant server environment.
 
user895378
anyway, I'm headed to the gym, bbl
 
@rdlowrey Cool man, thanks for chat so far
 
@rdlowrey Does pthreads work with eio?
 
First time here and I like what am seeing.
 
12:19 PM
@Asuquo12 Not sure why, I'd say the average level of intelligence in this room is halved whenever I enter :P
 
@Jimbo You lower it that much? :P
 
@kelunik Depends on quantity of beer provided :-)
 
What would be the advantages of PHP over NodeJS, especially when coupled with MySQL? I know that Node-s pluses are being event driven and async.
 
12:35 PM
We were just talking about how PHP can do async and event driven, there are libraries out there for that. It's just, more involved
 
@Jimbo not sure why you'd use pthreads for something I/O driven… well… obviously, if you'd use the sync ext/mysqli / ext/pdo modules, then yeah… but not if you control the socket yourself.
 
I do like NodeJS, but hooking up with MySQL is way easier with PHP
 
@bwoebi Well, so you can throw any old non-async code at an event loop and have it perform 'async'-like. Literally all the code you write could then go into this non-blocking style without you as the user caring about how it does it
(even if some of the stuff was initially blocking)
 
@Jimbo While it could, it wouldn't be performant, because it would have to create a lot of threads then..
 
@kelunik Cpu cycles would go crazy? How much are we talking here, more relatively than RAM?
 
12:50 PM
I don't know how heavy pthread's threads are.
 
@kelunik they're not totally lightweight, having to hold a copy of the php globals in each thread
 
/cc @JoeWatkins Would using pthreads for the 5th comment up be more or less performant than piling on the RAM for vertical scaling without pthreads in an async context? I think that's the right question :-)
I mean we know RAM is super cheap but... still
 
Abe
1:07 PM
@kelunik turns out that eval() wasn't a good idea after all. i knew it.
 
@Abe Told you so. ;-)
@Abe So you're searching for another solution or already got one?
 
Abe
1:22 PM
already got one. evil() was working, but i'm going to use something else
 
> Things are not always what the seem.
Lol
 
hi guys, I want to build a new pc and for the first time in my life I don't care about gaming performance because Iam now a ps4 user if I ever have the time to play. Do you have some good resources for building a pc for programming? Iam using Jetbrains IDEs like IntelliiJ, PHPStorm and webstorm.
Some resources I found say RAM is very important, others say cpu is more important etc. I want to achieve a good price / performance ratio with the best possible possible components regarding the priority of what is important for a programmers pc. Any good links or recommendations?
 
2:21 PM
@ycelik how much do you know about building computers?
also, do you have a budget estimate?
the short answer is: to get the best possible performance-per-price, you have to build it yourself (buying pre-built systems usually costs additional +20% or +30%)
 
@tereško Ive build 2 or 3 times before but mainly for gaming. I used my laptop for coding because I was studying and mostly didnt code at home. My budget is about 600-700 euro. I want to achieve a good price performance ratio with good components that I realy need. Those unimportant components should be cheap but Iam not sure.
what do you think about this:
AMD FX 8350 - 170 Euro
Sapphire HD6450 2x DVI and 1x HDMI to be able to plug 3 monitors - 50 Euro
Samsung 850 Pro 2,5" 256 GB, Solid State Drive - 150 Euro
I dont know about mainboard, power supply and cooling components. Dont know if i should pick cheap ones
 
never cheap out on the power supply
 
power supply should be ~10-15% of the total cost of the build
(rule of thumb)
 
@tereško also I think about getting 16gb of ram
 
lemme see what I can quickly assemble
what form factor are you looking at for the box? Full tower or maybe a microITX?
 
2:29 PM
@tereško no preferences
@tereško thanks man, also you can make suggestions. If you think getting a cheaper ssd or less ram but more powerful cpu just tell me. No decisions made so far.
 
Abe
omg, an army of elephpants
hide yo kids! hide yo wives!
 
@ycelik do you intend to overclock?
also, what about gaming?
 
@tereško no, I never did so far
@tereško dont care about gaming man, i just need to plug 3 monitors in my graphics card
 
so, no overclocking and no (high end) gaming
 
@tereško exactly
thats why Iam looking for recommendations. I dont know if I should invest more in cpu or ram or maybe in mainboard, power supply etc. I guess the fact that Iam not going to render or play games opens up possibilities to build a very good pc for programming with a great price performance ratio
 
2:50 PM
@Abe kill them!
 
Abe
noooooo y they are so cute :D
 
cute, but deadly :-P
 
@ycelik what ports do you need to the monitors?
 
@tereško I think 2 x dvi and 1 x hdmi. But I could also use adapters right?
 
yeah, but, if you get a crappy adapter, they tend to cause strange defects
 
ThW
2:57 PM
The card supports triple head? Most only support dual head.
 
this time is normal for a full-text search ? 0.0131 sec
 
ThW
Instead of 3 monitors, I would prefer a single ultra widescreen now
 
@ThW AMD's eyefinity thing should be able to
 
I read that the Sapphire HD6450 2x DVI and 1x HDMI is fine for triple mon setup
 
@bwoebi fancy a bit of debugging ?
 
3:05 PM
@JoeWatkins what's up?
 
something is leading zend_object_properties_size to be a negative value and addresses to change between ctor and dtor of an object ... apcu iterator ...
I'm just going round in circles, need more eyes ...
 
@tereško in the reviews section I read that other programmers with same goal were able to plug 3 monitors. also the card is very quite (passive). amazon.de/Sapphire-HD6450-Grafikkarte-Radeon-Speicher/dp/…
 
AMD's HD5000 and newer can plug up to 6 monitors in
 
@JoeWatkins okay, let me have a look
 
@ycelik ok ... this is "work in progress": pcpartpicker.com/user/teresko/saved/kwMYcf .. I am thinking about what should be switched out .. I want to get closer to 650 euro
 
3:08 PM
thanks bob :)
 
when I use this: $sth->fetch(), it will connect to database and search at it ? or just uses of what executed with $sth->execute() already ?
 
@Sajad execute() is when you call SQL
 
@tereško this is a good option to be upgradeable for future
 
@tereško but if I don't use $sth->execute() still I can see the result with $sth->fetch()
 
currently this thing is at 730 euro (I think motherboard is definetly too fancy in that list)
@Sajad have you actually tried learning how PDO works? I get a feeling that you just copy-paste code samples from internet and guess
 
3:12 PM
@JoeWatkins what's the value? 0xfffffffffffffff0?
 
it is not true - and not false :-)
 
@bwoebi -16
 
@tereško awesome. why did you pick intel instead of amd fx 8350 ?
 
@JoeWatkins so, you're having some issues with the guard not being counted towards property count? Or guard flag set even if not used?
 
@tereško yeah I think a cheaper mainboard will also be fine
 
3:13 PM
@ycelik because it is a microITX build. Although I am an AMD fan, in microATX form factor, the motherboard options for good AMD chips are complete shit.
 
86    return sizeof(zval) *
87        (ce->default_properties_count -
88            ((ce->ce_flags & ZEND_ACC_USE_GUARDS) ? 0 : 1));
how would that lead there ?
 
yeah, ce->default_properties_count == 0 and ce->ce_flags having ZEND_ACC_USE_GUARDS flag not set?
 
@tereško alright, got it
 
but the class is registered in the normal way
 
why fetchRow() works without execute() but rowCount() does not work without execute() ?
 
3:17 PM
@JoeWatkins may I see the code / an example causing it?
 
apcu seven branch
there's only 5 failing tests, one to do with references and inexplicable ones on iterator
so it must be normal for properties_size to be able to return a negative value, but the address of &custom->obj in ctor and zend_object* in dtor are different, can't trace it ...
 
@JoeWatkins unable to set a watchpoint?
 
in what context ?
I don't know where it changes
and there's no global ...
 
okay, well… let me download and compile it…
 
thanks
 
3:23 PM
...
 
@ycelik ok. You can use this build (de.pcpartpicker.com/user/teresko/saved/kwMYcf) as your starting point. The total cost now is 680€ (without peripherals and operating system). But you must ask second opinions on this (I am not sure about things like spacing, for example. Put it on few forums and ask people to suggest improvements.
Few places where I would recommend to ask would be: reddit.com/r/buildapc , reddit.com/r/PCMasterRace and forum.teksyndicate.com
What I made there is build, where major investment is the CPU (with a GPU, that can be considered for "low end gaming")
you probably will want to change the cooling solution and maybe the SSD .. not sure about the rest of the parts
 
@Abe $closure->call($obj, ...$args)?
 
Maybe, reduce SSD to 128GB and get another 1TB HDD
 
@JoeWatkins Still need help?
 
@NikiC so much
please ...
APC: apc_store/fetch reference test [tests/apc_006.phpt]
 
3:33 PM
@tereško looks really good, thanks sir! I'll post this setup to tomshardware and reddit for improvements. But I may order it without changes.
 
that one ...
 
@JoeWatkins I like your commit messages ... :P
 
@tereško my code work, I just want to know it is standard ? (it is what you told)
$sth = $dbh->prepare("my query");
$sth->execute();
$TotalResults = $sth->rowCount();
$i = 0;
while (($end = $sth->fetch()) && $i < 10)
{
// echo stuff
$i++;
}
 
@JoeWatkins Z_ISARRAY undef ref
 
3:34 PM
@NikiC huh ?
 
There's no such thing as Z_ISARRAY ^^
 
@ycelik btw, you should go through reviews for the each part that you can fine. For example, here you can find the reviews for that case, I put in your build: youtube.com/watch?v=NZXDgjVY_EI and youtube.com/watch?v=v9gmi2Dhzys
 
@NikiC woops, removed
 
@JoeWatkins thx, at least it compiles now ^^
 
@JoeWatkins I'm dumb, lol. forgot to switch branches. sigh.
 
3:40 PM
@bwoebi hehe, I saw ...
I forget what php5 internals look like already ...
I have space for one set of internals in my head it seems ...
 
hehe
 
/me waits to be told I'm stupid, and I done everything wrong
 
I'm confused at this segfault… stop reason = EXC_BAD_ACCESS (code=2, address=0x7fff5f3fffe8) … but where the hell does that access come from?!
The hashtable is 0x7fff5fbfde18 … and that's the only 0x7fff... address…
 
3:57 PM
what test is causing that one ? (also, I have no idea)
 
@tereško thanks, great idea. I'll build a very similiar build to yours and posted on reddit for comments and recommendations.
 
the apc_006 one
 
*I've I mean
 
oh the overflowing one ...
 
oh
it's an overflow…
 
3:58 PM
yeah
 
that explains the weird access
 
I'm trying to parse this feed: http://feeds.finance.yahoo.com/rss/2.0/headline?s=AAPL&region=US&lang=en-US using xpath, but when I use this query to get the links: $links = $xpath->query('//channel/item/link'); and print_r($links->item(0));, I get this:

DOMElement Object ( [tagName] => link [schemaTypeInfo] => [nodeName] => link [nodeValue] => [nodeType] => 1 [parentNode] => (object value omitted) [childNodes] => (object value omitted) [firstChild] => [lastChild] => [previousSibling] => (object value omitted) [nextSibling] => (object value omitted) [attributes] => (object value omitted) [o
 
should have done bt ^^
 
@JoeWatkins fixed the overflow, but result is different :/
 
ThW
@ray9209 var_dump($xpath->evaluate('string(//channel/item/link)'));
 
4:02 PM
you mean the test still fails or there is a different fault now ?
 
test fails, wrong refcounts
 
ah well, I have a clue to that maybe
if(ctxt->copy == APC_COPY_OUT || ctxt->copy == APC_COPY_IN) {
    /* deep copies are refcount(1), but moved up for recursive
     * arrays,  which end up being add_ref'd during its copy. */

}
that in my_copy_zval
 
@ThW That prints: string(0) ""
 
wasn't super sure of what to do there or if it was causing that test to fail so removed it ... can you figure out what is meant to happen there ?
(not sure why the last branch is there)
 
ThW
@ray9209 But I think you want something like this:eval.in/private/669a16cdd0c249
 
4:07 PM
@tereško I also checked www.passmark.com for performance toplists. I5 4590 and fx 8350 are equal in performance. The samsung 850 evo ssd seems to be a good choice for ssd.
 
I guess meant to set refcount=1 there, I think the else branch is superfluous ... but guessing is what I am doing, it been a year or more since I touched apcu :(
 
ah, there's COPY_IN and COPY_OUT, okay...
Didn't get it does both there
 
yeah
 
@ThW How does php://stdin work? How do I specify the link to the feed?
 
ThW
@ray9209 that is only for the example, stdin is standard input. Use the URL in this place, make sure you got the RSS source. This has nothing to do with the actual XML parsing or Xpath. Parsing happens after you fetched the RSS.
 
4:32 PM
@NikiC that's so strange ...
when you try to maintain ctxt->copied, you get another strange fault
 
What's the test for whether an exception is already active in php-src?
 
@Danack if (EG(exception))
 
ty
 
@JoeWatkins Ah, my result might be okay after all
After all, rc=1 is expected on strings now...
 
but there's arrays that are meant to be rc>1 and they're not
because ctxt->copied is never inserted into
but when you insert, you get a different fault ...
 
4:42 PM
@JoeWatkins Nope, they aren't meant to I think
 
aren't meant to insert ?
 
in php 7 debug_zval_dump gives you the refcount of the array, not the reference
And the refcount of the array is 1
 
but why can't I maintain ctxt->copied though ?
like that ...
it's duplicating things it shouldn't be, isn't it ?
 
why do you think that?
I tested debug_zval_dump before & after store/fetch and the only diff is the refcount on the strings, which is expected
@JoeWatkins bah, I made a mess with tabs/spaces
mind if I retab everything?
 
no problem
lemme push one time
oh nvm, you go
@NikiC YAY
so now just the iterator is failing tests ...
but for some reason only when run-tests invokes it ... or when you do USE_ZEND_ALLOC=0
php: /usr/src/php-src/Zend/zend_gc.c:226: gc_possible_root: Assertion `(ref)->gc.u.v.type == 7 || (ref)->gc.u.v.type == 8' failed.
Aborted (core dumped)
krakjoe@fiji:/usr/src/apcu$ USE_ZEND_ALLOC=0 php tests/iterator_006.php
 
4:57 PM
@JoeWatkins huh ... valgrind says the iterator was part of compilation arena?!
 
I don't know what the fuck is going on there ... the address of &custom->obj in create_object and zend_object* in free_obj are different ...
I'm so baffled by that, I dunno where to look
 

« first day (1778 days earlier)      last day (3170 days later) »