php-general Digest 5 Jan 2013 14:25:38 -0000 Issue 8088
Topics (messages 320032 through 320038):
Re: Boolean type forced on string assignment inside if statement
320032 by: Sebastian Krebs
320033 by: tamouse mailing lists
Pear Page2
320034 by: Silvio Siefke
320035 by: tamouse mailing lists
320037 by: Ashley Sheridan
320038 by: Silvio Siefke
Re: variable placeholders in a text file
320036 by: Kevin Kinsey
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
2013/1/4 tamouse mailing lists <tamouse.li...@gmail.com>
> On Fri, Jan 4, 2013 at 1:56 AM, Sebastian Krebs <krebs....@gmail.com>
> wrote:
> > 2013/1/4 tamouse mailing lists <tamouse.li...@gmail.com>
> >> Bit operators are not comparing values, they're COMBINING values.
> >
> > Technically spoken they're comparing bits, whereas boolean operators does
> > the same, but treaten every value as a single bit.
>
> And that's just going to confuse things. "Technically" speaking, bit
> operations and NOT logical operations. If you do this:
>
> if ($a & $b)
>
> when you meant this:
>
> if ($a && $b)
>
> it's because you got lucky, not because it's correct.
>
Sorry, but ... well, I don't understand you :X
When I want "&&" and type "&" it's simply a bug, but sometimes I want "&",
for example like in "$a & FLAG_ALLOWED", so I don't know, what you are
talking about right now
--
github.com/KingCrunch
--- End Message ---
--- Begin Message ---
On Fri, Jan 4, 2013 at 4:25 PM, Sebastian Krebs <krebs....@gmail.com> wrote:
> 2013/1/4 tamouse mailing lists <tamouse.li...@gmail.com>
>
>> On Fri, Jan 4, 2013 at 1:56 AM, Sebastian Krebs <krebs....@gmail.com>
>> wrote:
>> > 2013/1/4 tamouse mailing lists <tamouse.li...@gmail.com>
>> >> Bit operators are not comparing values, they're COMBINING values.
>> >
>> > Technically spoken they're comparing bits, whereas boolean operators does
>> > the same, but treaten every value as a single bit.
>>
>> And that's just going to confuse things. "Technically" speaking, bit
>> operations and NOT logical operations. If you do this:
>>
>> if ($a & $b)
>>
>> when you meant this:
>>
>> if ($a && $b)
>>
>> it's because you got lucky, not because it's correct.
>>
>
> Sorry, but ... well, I don't understand you :X
>
> When I want "&&" and type "&" it's simply a bug, but sometimes I want "&",
> for example like in "$a & FLAG_ALLOWED", so I don't know, what you are
> talking about right now
I'm talking about the first case, when it's a bug.
Missing important words;
"*and it works*, it's because you got lucky, not because it's correct"
--- End Message ---
--- Begin Message ---
Hello,
Is there something similar to Pear/Page2 module, that can working with HTML5?
Thanks for help, Greetings
Silvio
--- End Message ---
--- Begin Message ---
On Fri, Jan 4, 2013 at 8:18 PM, Silvio Siefke <siefke_lis...@web.de> wrote:
> Is there something similar to Pear/Page2 module, that can working with HTML5?
Would phptal be of use? http://phptal.org/
--- End Message ---
--- Begin Message ---
On Fri, 2013-01-04 at 20:44 -0600, tamouse mailing lists wrote:
> On Fri, Jan 4, 2013 at 8:18 PM, Silvio Siefke <siefke_lis...@web.de> wrote:
> > Is there something similar to Pear/Page2 module, that can working with
> > HTML5?
>
> Would phptal be of use? http://phptal.org/
>
I'm not sure quite what you'd expect such a module to do? Is this for
templating?
Thanks,
Ash
http://www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
Hello,
On Sat, 05 Jan 2013 07:53:04 +0000
Ashley Sheridan <a...@ashleysheridan.co.uk> wrote:
> I'm not sure quite what you'd expect such a module to do? Is this for
> templating?
page2 creates complete websites. Would be useful because I'm sitting
at the website internationalization. Template engines seem complicated.
Thank you for help, Greetings
Silvio
--- End Message ---
--- Begin Message ---
On Mon, Dec 31, 2012 at 02:29:38PM -0600, Nelson Green wrote:
>
> On Mon, 31 Dec 2012 19:59:02, Ashley Sheridan wrote:
> _______________________________
> >
> > On Mon, 2012-12-31 at 13:39 -0600, Nelson Green wrote:
>
<snip snip>
Nelson (et al),
I've enjoyed reading this thread and apologize for dredging it up.
It's interesting to see your progression of thought and the templating
discussion is indeed a worthy one.
However, I wanted to answer this objection from your initial message:
>The reason I ask is because I am going to want to do three substitutions,
>and I'd rather not do three str_replace calls if I don't have to.
You *don't* have to; str_replace() is perfectly capable of handling
arrays:
=====
$replace = array("USER","SITENAME","SOME_CONSTANT");
$replacements = array($user,$site_name,$foo);
$replaced =
str_replace($replace,$replacements,file_get_contents("/somefile.txt"));
=====
This, of course, doesn't negate a good templating system* ... but it's
handy to know and you'll probably use it sooner or later.
Kevin Kinsey
P.S. *assuming that's not an oxymoron!
--- End Message ---