« first day (2782 days earlier)      last day (2173 days later) » 

12:43 AM
hi everyone!
 
1:08 AM
when i post a form with a file, it tend to lose data that comes after the file on refresh
```<form action="test_img" method="post" enctype="multipart/form-data">
<input type="text" name="name">
<input type="file" name="foo">
<input type="text" name="another_name">
<input type="submit" name="submit" value="Upload File">
</form>```
i get all the data a first post, but after refresh $_POST show on `name` instead of `name, another_name, and submit` anything am missing?1
 
1:28 AM
@Wes so was I
 
Wes
define line break?
 
@Danack good way to improve with jang-bong
er, wait
you were referring to br
 
Wes
imho line break is just a new line
not margin or an empty line
> Line break, line breaking character, manual line break, or newline
from wiki
 
2:05 AM
hi
sorry, could you explain how i could use this room?
 
You could ask questions and/or answer questions. It's usually busy-er during the UK day...
 
Thanks for your reply, and then here is free about help?
 
You're free to ask for help, other people are free to ignore you.
 
Thanks for your help
 
2:25 AM
do you have any experience for php socket chat?
I have some issues here
are you there, @Danack
???
???
 
Wes
> other people are free to ignore you
 
why?
 
2:47 AM
moin
 
2:57 AM
@NikiC there is a problem in master with interned permanent strings, not sure where it was introduced, but INIT_NS_CLASS_ENTRY causes assertions to fail in debug mode, probably not noticed because nothing uses that internally perhaps, but it does call another macro that looks more widely applicable ... not sure, but can you take a look please ?
 
could i help for you?
@JoeWatkins
 
doubt it, ask anyone, I'm beyond help ...
 
ok
 
3:26 AM
zend_hash_init(&PIG(source)
ZEND HASH INIT PIG SAUCE
 
@Jincowboy because this is a chatroom... if you expect an answer from someone, that's what paying a consultant is for
since the thought of probably having to relocate if I find a job and they won't offer to pay for relocation has settled in the back of my brain, my self-control with spending has improved...dramatically... haven't seen this much in my checking account in so long
I need to trick myself like this more often
 
3:46 AM
That's a good idea
I am finally making money after a long time of... not... so I have so many things that I need to buy with my first paychecks. Hopefully (after I get everything I need), not having had money for so long helps me save up more than I was able to before
 
4:07 AM
moin
it's like, way early ...
 
4:20 AM
Hello. I am not a PHP dev. But I need help with some code, How can I convert a string into a byte array?
Current program uses this:
$iv = chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0) . chr(0x0);
 
mornin
 
I want to be able to convert '23bca21f' to this.
 
Wes
for($i = 0; $i < strlen($str); $i++){ $byteArray[] = ord($str[$i]); }
 
passing '0000000000000000' to this gives me 48.
actually I need to convert a 16 digit hex number to above format of $iv
$iv must be of 16 bytes.
gives me '4444444444444444' okay.
$byteArray[] = chr($str[$i]);
this works.
thanks
 
4:47 AM
New job, new agreements, proprietary information clauses always annoy me..
 
Hey, I'm trying to design a database that stores product information. I want to be able to filter and populate a list of the items on my webpage. I made a column that defines the product material (aluminum, wood, mdf..etc), but this only allows me to have one material. Some of the items are available in more than one type, for example, wood or aluminum.
To avoid redundancies, I thought making columns for each type of material and then using boolean to mark if the item is available in that option.
 
@wellington Look up manytomany database design
 
Thanks so much! I think that's exactly what I need.
 
5:51 AM
There is an English sound which sounds "why-raal". Does anyone what's that word?
 
Viral
 
why-raal means Viral @rupinderjeet?
raal of estonian is the heat of english
@Shafizadeh
 
ah thx guys
 
hey @wellington
are you there?
 
6:11 AM
Hello, @rupinderjeet
check this for your issue: php.net/manual/en/function.chr.php
 
o/
 
Value of PHP_INT_MIN cannot be used as default value for int parameter – #76385
 
interesting. lowering the number by 1 does work.
in HHVM it apparently uses a float
and yes: 3v4l.org/Jk4f1
 
mornin
 
it's a float
 
6:26 AM
@Wes your php instruction is wrong part: it returns here:
Notice: Array to string conversion in D:\wamp64\www\test\test.php on line 6
Call Stack
# Time Memory Function Location
1 0.0010 238488 {main}( ) ...\test.php:0
Usually int(-2147483648) in 32 bit systems and int(-9223372036854775808) in 64 bit systems. Available since PHP 7.0.0.
@Gordon
@Jeeves, Usually int(-2147483648) in 32 bit systems and int(-9223372036854775808) in 64 bit systems. Available since PHP 7.0.0.
 
interestingly, using PHP_INT_MIN as the default value will work. it only converts to float when using the actual number
 
for example?
 
I am talking about the bug sebastian filed
function f(int $i = PHP_INT_MIN) works, but function f(int $i = -9223372036854775808) will raise an error that it's not an int. and when you remove the typehint and dump $i you will see that it's a float when using the actual value, whereas using the constant will give an int, as expected
 
@Gordon , what number is PHP_INT_MIN in php?
when i echo it, face error
( ! ) Notice: Use of undefined constant PHP_INT_MIN - assumed 'PHP_INT_MIN' in D:\wamp64\www\test\test.php on line 10
Call Stack
# Time Memory Function Location
1 0.0000 238520 {main}( ) ...\test.php:0
and "int $temp = PHP_INT_MIN" have error
 
6:42 AM
@Jincowboy don't bother
 
ok
sorry
is there people that have regex knowledge?
 
7:12 AM
what you want to know?
 
@bwoebi because it's a different concern, completely synchronous too, and far from trivial stuff overall. If you want to build that, then make a new lib for it.
 
mornin
 
I'm using laravel and inserting text in $request to DB.
some of strings have font or characters can not be found in search query
 
preg_replace('@<script[^>]*?>.*?</script>@si', ' ', $page)
 
7:21 AM
how to remove fonts or invalid chars??
can anyone help me?
 
any developer that know how creating wordpress theme from scratch?
 
i'm getting request as Json :
json_encode($request->all(), true);
$number = $request["from"];
$body = trim($request["body"]);
I'm not famiiaar with regex
can you explain what does it do?
 
@Gordon When you get employed at places, you ever sign anything in regards to intellectual property? If yes, any chance you could share something that you think is favorable to sign? I'm about to decline a job/completely change their proposed agreement because of what they have.
 
@Darius Can you just remove those parts from the contract? Never had to sign something like that...
 
7:28 AM
@Darius in a nutshell: everything you create is the property of your employer.
 
Morns
 
@Gordon , i have already checked codex
 
@Patrick because it's likely governed by law in switzerland anyways
 
How about after-hour stuff? Your own start-ups etc. Switzerland define those?
 
i don't understand well how i could start creating from scratch?
I think that firstly i should design for it.
 
7:32 AM
@Patrick Yep, just questioning it because I do agree companies should have their entitlements, but it's a thin line to walk when signing these. So question of limiting it, or just altogether getting rid of it.
 
Why would you use wordpress
 
I gonna create wordpress theme from scratch
 
@Darius I remember reading something that said everything really means everything but a quick check only yielded dejure.org/gesetze/UrhG/69b.html which says every computer program you write for your employer belongs to your employer. so that would rule out code you didnt write for your employer.
 
@Ende ,for using html, css, php that i learn
 
@Darius usually only the stuff you create for your employer (during the time he pays for you) belongs to him. I would never sign anything else
Unless they pay me for 7x24 hours
 
7:37 AM
I really feel PHP should have a userland VO library
I need a microtime VO
you would think someone needed this before
but not much useful on packagist
 
@Jincowboy I don't think you learn a lot of doing that
 
@Gordon wouldn't it be simple enough to write one for your usecase?
 
@Ende no, I have already created own wp plugin and then etc
and then know css, html, php, wp function hook and filter knowledge
 
@Patrick yes, but that's missing the point
 
@Gordon I think generic VOs are pretty much useless anyway. I would rather have a Username object than a string Object for example. Wouldn't the same apply to your VO?
@Jincowboy You have a bachelor of engineering but you want to do wordpress development? What went wrong?
 
7:46 AM
mornin
 
@Patrick, Yeah, i want
trying to work with wordpress development when i am free
 
@Darius I have signed an IP agreement, which just states lthat any code that I write for my employer, belongs to my employer, and I must not make a copy of that code or use it anywhere else. And I don’t think that that’s a big problem.
 
o/
 
and then very interesting in html, css, php and wordpress
 
@mega6382 nope, that sounds reasonable. This employer seems to have gotten one of those "just to be safe" copy pastes from somewhere.. which is BS.
 
7:48 AM
I mastered about validation and verification for design of software
with using enterprise architect
 
Changing it to exactly what you wrote or not signing this at all and walking away :p
 
so i have good knowledge about it
 
wat
 
@Patrick no. Microtime is a type. Just like Money and Email. There are some types that are defined well enough to have them without reinventing them in each project.
 
@Jincowboy I am not entirely sure how it is related to wordpress =)
 
7:51 AM
not related
I had been researched until now, but i want to develop new web and app
 
@Jincowboy and there are better ways to that than wordpress
 
I know it, but want to develop
 
@Jincowboy you don't need wordpress for that. Wordpress is a horrible thing to learn, it's all bad code and it doesn't pay well at all to be a wordpress developer
 
^
 
@Jincowboy you seem to hard set on that with utter disregard for reason. So, good luck then, I guess.
 
7:55 AM
@Jincowboy usually, when people start learning web-development the prograss goes something like this: you make a completely static site with HTML/CSS, then you start looking for ways to reuse parts of html (like header, footers and navigation) - that's where php comes in. Then you start looking for reusing the "content retrieval" code - which is when you start adding database. Then you try adding some login/registration, which creates a need for adding some basic ""front controller".
 
@Patrick That's not true, have a colleague that sells $79 visual composer wordpress templates for $3-5k each lol. He just sets up 5-8 pages and puts in products if they have any. Just gotta find the dumb people.
 
Then you want pretty URLs, at which point you add routing code
and then you start adding some OOP
that's basically how you can learn while making something from scratch
 
@tereško prograss… mhmhmm… you just revealed yourself, you little midnight toker
 
@Gordon fuck you, I have not had my coffee
 
@Darius And how much does he earn per year? I used to do that too years ago... Pays much better to be a real developer (whether you do freelancing/consulting or are employed)
 
7:57 AM
Danack has just descneded into the chat.
@Patrick He's an outlier, he makes quite a bit, a little over 100k because he also does photography as a bonus for those clients. He got himself into some rich neighborhood and just reusing him all the time.
 
Different behavior between Array and ArrayIterator in foreach loop... – #76387
excogitate to think out; devise; invent.
 
@Gordon That's just entrepreneurs who happened to use wordpress for their blogs?
 
@Patrick the second link
 
Of course you can make money selling crappy wordpress sites and templates, but that's being an entrepreneur, not a wordpress dev
If that's the goal, it's better to focus on selling and oursourcing the dev
 
8:00 AM
@Ocramius constructors are expected to not have I/O side effects - but okay.
 
@Patrick that's a difference most youngsters will not understand
 
I know a guy who used to write plugins for some big time wp plugin marketers. He earned scraps while the marketing guy got the big money
 
@Jincowboy here is the real question: do you want a quick result, while harming your future growth OR can you live with slower progress, but without any limits
wordpress will give you fast results with minimal effort and understanding
 
Location: Shenzhen, Guangdong, China
Take a guess
 
@Patrick E_RACIST
 
8:05 AM
@Patrick no idea. I don't have any stereotypes for chinese
 
Why are these guys argueing about there answers so much O_o stackoverflow.com/q/50578554/9427768
 
Noun: bikeshedding (uncountable)
  1. Futile investment of time and energy in discussion of marginal technical issues.
  2. Procrastination.
Verb: bikeshedding
  1. simple past tense and past participle of bikeshed
 
lol
Never heard from that word before
 
bikeshedding: basically any discussion about MVC
 
8:15 AM
o/
 
everyone, i know css, html, php
 
that\s a vague claim
 
@Jincowboy people can also be asleep.
 
Who's css
I wanna meet him
 
thanks @Danack
I know css, @Ende
 
8:26 AM
@Jincowboy have you installed the php extension for sockets?
and if it is installed, have you enabled it in the php.ini config?
 
@Ende not sure you do. He lives in boxes.
 
@JoeWatkins do you plan any notification mechanism for weakrefs, like in python (implemented in pinepain/php-ref)?
 
@tereško i couldn't config php.ini in my 1and1 hosting
 
you could check phpinfo() to see if it is enabled
if it is not, you either have to email your current hosting OR move to a VPS hosting OR configure the test server on your own computer (probably using virtual machine)
 
how come that php returns the first code that was set with http_response_code instead of the code that was set the second time?
 
8:35 AM
I had this song in my discover weekly playlist yesterday. It's not particularly good, but it immediately reminded me of R11. Well, maybe not R11 in general, but just @Jimbo… but maybe also of R11 in general…
 
yeah, someone say to me that it is realted with hosting service
@tereško
But i try to implement now's hosting.
 
http_response_code(curl_getinfo($ch, CURLINFO_HTTP_CODE));
for example this only works the first time
 
@Jincowboy it should have been "someone told me" and not "someone say to me" :D
 
if the first request was 201 and another request 409
 
thanks@tereško
 
8:36 AM
curl shows 201
 
@Nerva you mean single curl?
 
you can use virtualbox to configure an independent server on your own computer
 
@pinepain no
 
i have already virtualbox with ubuntu
 
Any of you had the chance to play around with openstack?
 
8:38 AM
I needn't it in local
i need in live server
 
then you need a different hosting
 
I have a PHP curl class that creates curl request
my php code creates two of them
 
thanks @tereško
 
the first is 201, and the second 409
 
let me see your code
 
8:39 AM
when I send a request to my server with the terminal
 
@Nerva
Let me see your curl code
 
using curl from I get 201 by usng the -i option
okay
  class HTTPRequest {

    protected $rootEndpoint;
    private $header;

    public function __construct($rootEndpoint, $header) {
      $this->rootEndpoint = $rootEndpoint;
      $this->header = $header;
    }

    protected function request($url, $type, $expectedCode, $payload = null) {
      $ch = curl_init($url);
      curl_setopt($ch, CURLOPT_TIMEOUT, 30);
      if(strtoupper($type) !== 'GET') {
        curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
      }
      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $type);
 
@Gordon Responsive box?
 
if so, you have issue in request function
don't you know php?
 
What do you mean?
Everything works besides that thing
so I think I know PHP
 
8:48 AM
yeah, so do you get $response?
or not?
 
what's the issue are you talking about?
my only problem is the status code
 
yeah, didn't you get $response also?
 
yes
$response is null
but the status code is being set before that
so that should't matter
 
0
Q: Losing $_POST data after a submitted multipart/form-data form reload

Chrys UgwuLosing $_POST data after a submitted multipart/form-data form reload. I have the below form: <?php var_dump($_POST, $_FILES); ?> <form method="POST" enctype="multipart/form-data"> <input type="text" name="name1" value="name1"/> <input type="text" name="name2" value="name2"/> <input...

 
8:54 AM
I have null in my end
so could you use this code?
$ch=curl_init(); // cURL started here
curl_setopt($ch, CURLOPT_URL, $domain);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,false);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_HEADER, true);
curl_setopt ($ch, CURLOPT_NOBODY, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$curl_result = curl_exec($ch);
curl_close($ch);
 
but that code doesn't work for me
my class is very different
 
why?
 
do you see any problem with my class or not?
 
hi
I think that the usual curl method doesn't need this ($type, $expectedCode, $payload = null)
 
Thank you for trying, but I don't think you can help me
 
9:00 AM
@Jincowboy that is a cuatom abstraction of curl
 
I know
thanks
@mega6382
@Nerva you are welcome
 
php > echo microtime(true);
1527583113.778
php > echo (new DateTime('@'.microtime(true)))->format('Uu');
206426911163000000
php > echo (new DateTime('@'.microtime(true)))->format('u');
000000
php > echo (new DateTime('@'.microtime(true)))->format('U.u');
1527612825.000000
php > echo (new DateTime('@'.microtime(true)))->format('Uu');
43466834454000000
php > echo (new DateTime('@'.microtime(true)))->format('Uu');
59876354477000000
php > echo (new DateTime('@'.microtime(true)))->format('Uu');
128039388078000000
this is hilarious
 
@Nerva i have tested the code and that seems to be working fine, so the issue might in your request.
 
@mega6382
no
if code have no issues, request couldn't have issue
 
@mega6382 thanks, I realized that too, since I tryed to set mulple times the status code manualy and it works
so the problem should be somewhere else
 
9:13 AM
@Jincowboy your logic is flawless, how did you get to be so smart?
@Jincowboy there are many ways for request to have issues without beimg an issue in the code
 
why are you saying so?
no, no
I think that there is no result without reason
 
@Jincowboy obviously, but the reason is not necessarily this code, but could be the code of the url where the request is being sent to.
 
so you mean that target url have some issues?
 
Hello
 
hmmm .... looks like Disney sent down a memo, and it contained a phrase "it's a good thing": i.redd.it/pg7wm8a62q011.jpg
 
9:26 AM
@mega6382 Cannot modify header information - headers already sent by (output started at
this is the problem
 
Morgens
 
@bwoebi again: over-simplification. We even removed this sort of feature from doctrine/dbal because we're in the land of hydration and mappers, not DALs
@kelunik do you have any experience in making a Generator-based HTTP client and server for piping through serialized objects?
Thinking interface Service { function call(...$params) : Traversable; } being exposed over HTTP
 
9:42 AM
hmmmm model classes. Think I could apply to one of those?
 
@Nerva if you have any sort of output ie html, echo or whatever before the sending of the response headers you will get this error.
 
@PeeHaa if you are modeling for "before surgery" ads, yes
 
:D
 
@Patrick Anemic Entities + Entity Module (misnamed Service) is a thing
it's more or less martinfowler.com/eaaCatalog/tableModule.html with Entities
 
anyone know wp?
 
9:50 AM
@Jincowboy is it me or are you asking this all morning long already?
 
why is underline text displayed eventhough it have no css
<a href="<?php echo get_option('home'); ?>">
 
@Gordon you weightlifting again?
 
this is displaying underline(Jincowboy E-Learning)
 
Because that's the user agent default way to render a lnk
 
@Naruto huh?
 
9:52 AM
Also you most likely have an xss vulnerablity there
 
also get_option does many wonderous things
 
@Gordon I need a bucket
 
so i tried that gonna remove textdecoration in it
but not fixed
 
Yo are cssing wrong probably
 
.main_home{
text-decoration: none;
} is not working for me
 
9:55 AM
Don't guess. Inspect the element
 
@Ocramius ask Amazon
@Jincowboy back then when I was still doing frontend work people used a global CSS resets for these kind of things. dunno if this still a thing. your job to find out.
@tereško you gonna like that. NSFW because boobies in the back
 
CURLOPT_SSLKEYPASSWD is not supported when curl is compiled with NSS – #76388
 
Removed a large file from a git repo, git log --stat|grep FILE show nothing, but git rev-list --objects --all|grep FILE keeps listing it. Why? git fsck --lost-found reports nothing
^ I already tried stackoverflow.com/questions/1904860/… but the .git size won't decrease. The blob is in a pack, not sure if that matters
 
10:11 AM
Off the top of your head. Symfony, new item(); , if I persist a new item, then add stuff to variable/entity, and i persist again, then flush, 2 items or 1 item generated?
 
1
 
thanks
 
It will update the entity
 
makes sense, just had to double check.
appreciate it
 
np
 
10:24 AM
the joys of having an error thrown from apostrophe , should've been a quote.
 
@Ocramius Generator-based HTTP client?
 
10:48 AM
@Gordon mostly meh
 
@tereško give it time. I am sure it will pop up in your head next time you explain something to someone
 
hmm ... that's possible
 
11:11 AM
@kelunik yeh, was looking at stuff like github.com/phly/psr7examples/blob/master/src/IteratorStream.php, but then I went a bit over the architecture and all these folks really need is fpassthru()
 
@Ocramius you mean a Generator whose yielded values are returned as response?
 
hi
 
aye, and on the other side a client that does the opposite
but forget it for now, will do it as a side-project if I need it
 
on laravel if I do in a controller return view('dashboard')->with('formular', $user->forms); what can be the cause to not have the variable formular in the dashboard view?
 
11:26 AM
"the cause" is laravel
 
does microtime() work on windows?
 
@Ocramius well, writing a generator to output isn't hard - the hard part is input to generator as this will require you to do parsing, where the boundaries are, what size the chunks are you want to pass in
 
@IROEGBU I think it is a good framework
 
blah, I guess I will need to get a LinkedIn :|
 
@O.Rares Most people here don't.
 
11:29 AM
@O.Rares you believe many silly things
 
@O.Rares 99% of the people in here will disagree with you
 
why ? I chosed it because was ranked first on php framework tops
 
you don't need a framework
use libraries
 
@Gordon yes
 
something else I should add to my list!
 
11:30 AM
@O.Rares Ranked according to what?
 
too late to go back when I almost finished the project
@2dsharp to some ladies that post there
 
@Gordon Yes, it does. The last time I checked was 4 years back. There could be a few gotchas: stackoverflow.com/questions/18889244/…
 
@O.Rares because it's a static framework, which is filled with bad programming practices and anti-patterns. And its community is extremely loud and ignorant.
 
@tereško good to know
 
11:33 AM
In argumentation theory, an argumentum ad populum (Latin for "argument to the people") is a fallacious argument that concludes that a proposition must be true because many or most people believe it, often concisely encapsulated as: "If many believe so, it is so." This type of argument is known by several names, including appeal to the masses, appeal to belief, appeal to the majority, appeal to democracy, appeal to popularity, argument by consensus, consensus fallacy, authority of the many, bandwagon fallacy, vox populi, and in Latin as argumentum ad numerum ("appeal to the number"), fickle crowd...
 
@bwoebi aye
 
@Tiffany I also saw that one passing by, funny how he asks us to hurry xD
 
@tereško Just like "Java is good"
"Saying that Java is good because it works on all platforms is like saying anal sex is good because it works on all genders." - wise person.
 
@IROEGBU it is.
 
Java is good.
 
11:36 AM
then why to choose php over java ?
 
@O.Rares tbh, not sure
 
not sure either
 
php chosed you I guess
 
@Gordon It is not good because it's popular, there are other reason it might be good.
 
@IROEGBU but still good.
 
11:41 AM
for?
 
mostly everything
@kelunik what was the outcome of bugs.php.net/bug.php?id=68029 given that it was closed?
 
\o
 
11:56 AM
@Gordon didn't hrtime() get added to php-src for 7.3?.. *wanders off to find evidence of that*
 

« first day (2782 days earlier)      last day (2173 days later) »