« first day (2204 days earlier)      last day (2737 days later) » 

12:00 AM
@Andrea They still don't provide USB-C to lightning cables when buying the iPhone?
@Andrea doesn't everyone do that?
@Andrea I mean… who wants to have an extra charger just for the iPhone, when the laptop does it too?
"In the Box: Lightning to USB Cable" — Thanks for being helpful, apple site -.-
 
12:34 AM
@bwoebi they do, but not in the box
 
@Andrea well… I anyway won't buy a new Mac soon… ^^ and by 2019 or such they'll surely deliver these by default too…
 
@bwoebi one can hope!
 
:-)
 
Wes
1:03 AM
mordnsfnfg
 
1:17 AM
morning
i feel @wes that you are connected 24h
lol
 
Wes
almost
 
which part of the globe are you at now
 
Wes
Italy
 
1:41 AM
moin
 
Wes
hey joe... where you goin with that hammer in your hand
 
wherever it is, I won't be asleep ...
 
Wes
:P
how much have you slept?
 
few hours
 
Wes
me too
like, 5
barely
 
1:47 AM
about same
might aswell do something now I'm awake ...
 
who asked you to speak @Jeeves ...
gobby elephpant ...
 
Wes
:P
 
2:19 AM
3am, documentation
 
Wes
writing documentation?
that hurts :D
 
yeah
 
Wes
2:49 AM
my biggest problem with the documentation
apart english, obviously :B is keeping the style consistent
 
morning
 
Wes
yo
 
o/
 
@Wes I find it helps to discover inconsisencies in the api too ...
it's just so time consuming to write docbook, it's the most verbose thing ever
 
Wes
lol yeah that's really bad. tried to edit a page once, it nearly killed me
 
2:54 AM
not to mention stupid, it's so stupid, files have to be in a certain structure, and so do directories ... that the structure of directories dictates the style of the output is so dumb
you can't have namespaces the way you want them because the manual totally fucks up displaying them
I complain about this, but never do anything about it ...
we could generate complete documentation using reflection but for some reason we do a really bad job, so bad that you have to open every single file and edit it anyway ... someone should just fix docgen and it would take a lot of the pain away
 
Wes
i have big hopes for @kelunik's phpdoc generator
 
also I should be allowed to choose how to use namespaces ... everyone else in the ecosystem gets to choose but pecl devs can't if they want their manual pages to be non-stupid
 
Wes
php would be documented with php files stubs, like phpstorm internal documentation
then markdown
 
to get php systems to adopt anything new, even if it's brilliant, is a big ask ...
 
Wes
:(
 
3:00 AM
yeah, like everything, you can only move forward if you are holding onto the past with one hand ...
what we need is something new that offers us some kind of transitional support ... it's too much to just switch to a new format
 
Wes
it would be way more effort than just converting docs to the new format
 
whatever you calculate or estimate the effort to be with whatever route you are imagining ... it is 10 times more effort at least ... we need someone not afraid of effort ... migrating php.net to use different documentation format is a job that would last several years
simply having some software that can generate documentation is the very smallest problem that there is ... you also have to update an editor, educate translators all over the world, convert 20 years of history into a new format, and check it ... and there's probably 10 huge jobs I haven't thought of, I don't know everything about how the documentation stuff works ...
but I know it's a huge project ...
it's not a thing I would personally start, I'm not afraid of effort, but totally terrified of docbook
just changing the style sheets, and markup took years to complete ...
 
Wes
clearly it's a lot of work with any route but
translations are pretty much dead, you probably don't know
 
I didn't
probably because it's so much effort
 
Wes
most of people reads the site in english regardless a translation exists
mostly because translation is never in sync
for example the italian documentation has pages that are php 5.0 old
and i just avoid the entire thing so i'm sure i'm reading the most updated doc, which is the english one
 
3:16 AM
that's pretty crappy, but even the scale of that part is smaller, there are probably parts I don't know about and I'm probably underestimating those bits I do know about ... maybe you wouldn't need transitional support, but without that you would need to run a beta alongside php.net for so long, that it might actually be faster to have the transitional support
I don't see a way around dealing with the format we have now, not really ...
either you have to output in that format, or you have to accept it as input ...
 
Wes
yes, yes. that would be a good idea. i mean the beta
a big problem could be mirrors
but do we need mirrors, in 2016?
 
but while you're running a beta, everyone is still maintaining the old format, so there's no getting away from the fact that you must deal with docbook at some point
 
Wes
if they die they die
 
well as I understand it, the bandwidth the mirrors supply is substantial, and donated to us by the provider
 
Wes
but, apart from the editing which is extremely tedious, docbook, the format, does make sense?
like, searching, indexing, whatever
there must be a reason it's so complex
 
3:21 AM
I'm not sure about that, we do search it, and if you dug about in php-web for long enough you could find out ... docbook itself is very verbose, it contains a lot of information about everything, in that sense it's a good format
imagining a way for markdown, or anything to encode the same information with the same fidelity is difficult
 
Wes
because, if the verbosity is given by xml, it's not actually docbook's fault. in that case we could write a converter, or a wysiwyg editor (which is what dave asked me now that i remember of it)
 
an editor would solve most of the problems, but for some reason we stopped short of doing that on edit.php.net
I think there are some technical barriers to overcome there ... but we were probably going at it wrong, thinking we need a build of the documentation, rather than just the style sheets and a template
it does let you preview some pages
but not useful ones iirc
wysiwyg would be an excellent thing to have ...
actually a function declaration does encode the same information, so it's not that difficult after all :D
 
Wes
that's a thing i could actually do even if it's like the last thing i would do :B the wysiwyg editor i mean
 
I like to think I could, it might take me twenty years ... but in all honesty I probably couldn't ...
 
Wes
the hardest part is not the actual editor, but understanding the docbook xml :B
is there a xml schema somewhere?
 
3:29 AM
I'm banned from doing frontend stuff anyway, peehaa forbids it ... I tried to do just a form once, it was so bad ...
v5 it looks like we are using
<!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN"
"./docbook/docbook-xml/docbook.dtd" [
 
Wes
yeah as expected that's a lot to read
 
I think we have our own schema as well, but dunno how to find it
 
Wes
 <para>
  Formally:
 </para>

 <informalexample>
  <programlisting>
i quit.
 
lol
 
Wes
3:50 AM
also
would it be ok if the editor supported one browser only? chrome/ium
i imagine not. this alone doubles the complexity
 
well
eventually you would have to support everything, but if one person does the work in chrome or whatever, someone who knows about ff/ie (and uses it as their favourite browser, and needs to edit docs) might do that work for you ...
 
Wes
i could do that, but it's a colossal work
how do you write stuff like bold italic tags in docbook?
html namespace?
also, do you imagine it working like msword or a collection of <input>'s would be good, with keyboard navigation and stuff?
 
4:16 AM
like msword would be great
I'm not sure actually, you'll have to find a page that does that and see how it does it ...
I know there are such pages, maybe even ones I wrote
like msword would be good, but anything that generates documentation that I don't need to edit every single page is better than what we have now, by miles ...
 
Wes
4:32 AM
can you make me a list of functionalities, like add paragraph, remove paragraph, bold, italic, add code block regardless of how they are done. the minimum functionality for it to be useful
just to understand if it's feasible
 
well requirements would be slightly different for each element ... but take a class index for an example
set description and version information at top, then an introduction, then class modifiers, then adding properties and constants, then methods, then the ability to describe each of those (adding/editing paragraphs/sentences etc)
then similar elements for all inner (method/function) pages
 
Wes
yeah it's a monumental work
 
@PeeHaa omfg. you jerk. do you realize I actually took that nsfw tag seriously and couldn't wait to get home to understand how that could possibly be nsfw? you... well played sir.
3
 
Wes
i think i could try to do it but it would take me ages
 
also mornings
 
Wes
4:45 AM
\o
 
@Jimbo I dont know. What would you like to happen? I can be around anytime. Got nothiing to do on Saturday and the son is with his grandma.
 
5:07 AM
\o
 
hello, if we write "sign up" in pdo , we have to write code in PDO only for all related features like sign in , my account, log out, change password...etc , it will be better if there is some logic to link mysqli & pdo, so that we can use mysqli in some features & PDO for rest....
 
@nsdlfefinedieicbe why would you want to use mysqli AND pdo? what features of mysqli do you need that that are not in PDO? And if you know you need these features, why did you also pick PDO?
 
@Gordon to be frank with you, i am taking help from google for code, as i am new to php world, so in some links, i will get sign up with mysqli and in some links i will get my account with pdo, so i thought if it is any way ?
 
by "taking help from google" you mean you are mindlessly copy and pasting random code snippets into your application?
 
@Gordon actually yes, later i will try edit code to improve ..... regarding security and performance
 
5:23 AM
@nsdlfefinedieicbe aha, well in that case, you are on your own with that. Good luck.
 
@Gordon if any expert like you write all code in pdo for signup, sign in , myaccount , email verification...etc and if they upload in github or any blog, that will be helpfull for millions of beginners....
 
@nsdlfefinedieicbe you seem to be assuming "code in pdo for signup, sign in , myaccount , email verification...etc" is not incredibly broad?
 
@nsdlfefinedieicbe you dont mean helpful. you mean easy. you just admitted to mindlessly copy and pasting stuff from teh interwebs. I am not going to do your work for you.
"helpful" was the advice we gave you a few days ago which you apparently ignore because you still seem to think you will be better off with the lazy route. that's fine with me. go ahead. just dont expect too many of us in here to support you with that.
 
As someone just observing this conversation, I mindlessly (maybe not completely mindlessly) copied code from online, studied it, and rewrote it all for a project for myself. Then after 2-3 years of playing around with it. I finally tore it all down and rebuilt it ground up using the methods I learned. So there's some value to having ready made pieces, but not for a live environment.
 
@Gordon i mean it will help for millions, not only me..... but every developer should write code, thats going to take him in right path, i know copy pasting will kill developers in future.....
 
5:27 AM
But yeah.. you gotta know why you'd be using something, and not just using it because "it works".
 
somewhat lol
 
copy pasting will kill developers? \ol \o/ |o/
only thing to kill developers will be augmented reality with an AI that's self sufficient and capable of thought
 
@Gordon also i will follow your words, i didt ignored your words, as i need to finish project soon, i am copy pasting, for sure, i will try to write code..... Thanks....
 
after that, the AI can just make itself better lol
How I wish I could make facebook via copypaste, including its server structure and etc.
like.. one webpage that has the entire instruction
(sarcasm, wishful thinking)
 
happy happy Rebecca day all
 
5:32 AM
what's rebecca day?
 
!!friday
 
oh god
i never thought I'd see that again
 
you misspelled wish
 
@Darius you'll see it here every rebeccaday
 
5:35 AM
lol
 
she is the patron saint of room 11
 
hi
 
happy fridays
o/
 
Wes
5:54 AM
@Ocramius y u no wear the halloween avatar in here? which by the way is one of my best
hi all \o :B
 
o/
 
@Wes mine needs a teeny tiny imperceptible set of fangs, such that you'll never know whether I've swapped it out or not
 
Wes
lol
 
the uncertainty makes it spookier
 
Wes
 
6:06 AM
@Wes it'd be better the other way around, with the seahorse about to eat the shark
 
Wes
lol
 
6:19 AM
:P
 
Morning
 
Hey guys
Good morg
0
Q: Split data from Array in PHP

ZedI have the array object as follows: $example="SimpleXMLElement Object ( [@attributes] => Array ( [PartnerCD] => 7882 [OrderID] => 6081832 [Timestamp] => 2016-10-28 05:35:24.000 [StatusCD] => 6 [StatusName] => Approved - PCB [ChannelCD] => 2 [ChannelName] => WEB [OfficeCD] => 0 [OfficeName] => Al...

Please help me on this
I m new to php
 
Morning and happy Friday!
 
6:35 AM
@SSJGSS can you provide the xml in your question. You are currently showing var_dump output assigned to a variable which I am fairly sure is not what you have there.
@SSJGSS also why is the question asked by someone else? Do you have multiple accounts? Why?
 
HI @Gordon
That was my colleague.
and i dont have the rights to post a question. Due to previous questions.
Provided the XML
 
morning
 
@SSJGSS and you want the attributes of the element?
    $xml = <<< XML
    <foo>
        <bar attr1="blah" attr2="bleh"/>
    </foo>
    XML;

    $foo = simplexml_load_string($xml);
    $attributes = array_map('strval', iterator_to_array($foo->bar->attributes()));
    print_r($attributes);
 
@gordon
how can i get the output unlike this
'PartnerCD' => 7882,
'OrderID' => 6081832,
 
6:51 AM
what do you mean by "unlike this"?
 
like the below output
Since i need to assign each variable to its relevant item in database
 
why dont you just assign the simplexml attributes directly?
also, have you tried the snippet I just showed you?
 
yes gordon. thanks.
got it
since i am a newbie, got into confusion. Thanks for the help
 
if you are also filling boring data in a boring table in a boring company --> youtube.com/watch?v=10uq7SE890c
cool pilot show to watch while working
 
@Gordon - Good job. You raised the right flag :)
 
7:04 AM
@TheLostMind well, guess I learned a thing or two when I was still an active mod. thanks for handling.
 
Indeed you did. Thanks :)
 
And best regards to the blue room
 
hi anyone
i have three array $data,$data1,$data2
all three arrays have values in same pattern
i want to merge all three values in one array
 
@SSJGSS - Replying to your message (somewhere else). Please don't ask questions related to moderation in this room :)
 
Wes
7:11 AM
mornings 2
 
Morning
 
@FélixGagnon-Grenier lol
Morning all o/
 
morn
got a package that i require via composer.... use SimpleExcel/SimpleExcel is not working. do i need to add a namespace or something ?
 
exactly @Wes
 
Wes
7:25 AM
composer require faisalman/simple-excel-php
 
yeah i did that. it got downloaded. in my index.php i got now

use SimpleExcel\SimpleExcel;

and getting this error: Fatal error: Class 'SimpleExcel\SimpleExcel' not found in /Applications/XAMPP/xamppfiles/htdocs/excel/index.php on line 5
author says thats the require command
 
Wes
trying
 
@Traxstar y u no using github.com/PHPOffice/PHPExcel?
 
Wes
also this ^
 
i will try :D
 
7:28 AM
yesterday, by Gordon
@Traxstar do or do not. There is no try. And yes, I know dealing in absolutes makes me a Sith.
 
fuck my life :D i do
 
!!friday
 
Anonymous
mornin
 
Anonymous
@bwoebi the yielding part :/
 
Wes
7:32 AM
works for me though @Traxstar
 
He jamey
 
@Wes wut
 
Anonymous
\o
 
Wes
use SimpleExcel\SimpleExcel;
require(__DIR__ . '/vendor/autoload.php');
$excel = new SimpleExcel('CSV');
var_dump($excel->parser->getCell(1, 1));
Warning: array_key_exists() expects parameter 2 to be array, null given in E:\...\SimpleExcel\Parser\BaseParser.php on line 148
but i can already tell you should be using phpexcel :P
phpexcel is incredibly well made
 
yeah i am having a look at it at the moment, need to understand the structure :)
 
Wes
7:37 AM
also i just realized its author is sometimes in this room :P
 
gudmornes!
 
Wes
\o
 
ahhh... rebecca day..
 
Anonymous
o/
 
ugh missed the edit window :(
1 message moved to bin
 
7:47 AM
What's a weekend?
 
The thing where you stop programming for client and start programming for yourself
 
#NerdLife
 
@PeeHaa oh, conferencing?
 
More dicking arounding with fun stuff instead of client stuff
 
7:48 AM
meurning
 
@Ocramius BTW any chance you are going to phpuk
 
why is this invalid: $inputFileName = './sampleData/example1.xls'; and brings this error ?
Parse error: syntax error, unexpected ''/sampleData/example1.xls'' (T_CONSTANT_ENCAPSED_STRING) in /Applications/XAMPP/xamppfiles/htdocs/excel/index.php on line 11
 
The error is the line before it
 
nope. line before is valid. $objPHPExcel = new PHPExcel();
 
Well either it's the line before it or your shared code is not your actual code
 
7:51 AM
got same error when only this line is in file
 
Anonymous
@Traxstar Error messages don't lie, gist your code
 
@Traxstar pretty sure you have a double quote in your title
 
@FlorianMargaine what ?
 
@Traxstar That is NOT your actual code
Install an IDE so you can find the problem yourself
 
7:57 AM
@PeeHaa It is. I just have copied it.
 
No it is not
 
what the fuck dude :D i see it in front of me
 
No you don't
 
Wes
every time i move i'm like - did i move myself of it's an earthquake. not a nice sensation
 
That code of which you say you see it "in front of you" will never result in that error
 
Wes
7:58 AM
not that i'm near the epicenter
 
@Wes :P
 
Wes
ever been in an earthquake?
 
phpstorm says everything is valid
 
Anonymous
> Error messages don't lie
 
@Wes Nope. But I remember yeeeears ago there was a big one somewhere in europe which could even been felt over here. But that was very limited
 

« first day (2204 days earlier)      last day (2737 days later) »