<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>laplace&#039;s demon &#187; php</title>
	<atom:link href="http://www.laplacesdemon.com/cat/programming/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.laplacesdemon.com</link>
	<description>Süleyman Melikoğlu</description>
	<lastBuildDate>Thu, 26 Jan 2012 10:26:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Zend Framework 2 comparison</title>
		<link>http://www.laplacesdemon.com/2012/01/19/zend-framework-2-comparison/</link>
		<comments>http://www.laplacesdemon.com/2012/01/19/zend-framework-2-comparison/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 13:36:31 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=416</guid>
		<description><![CDATA[I&#8217;ve been using Zend Framework 1.x for quite a long time. It is a stable framework with a lot of features. But I always have some performance issues in terms of memory/cpu usage and page load time. I have looked at the new version of Zend Framework which is under active development. As my first [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Zend Framework 1.x for quite a long time. It is a stable framework with a lot of features. But I always have some performance issues in terms of memory/cpu usage and page load time. I have looked at the new version of Zend Framework which is under active <a href="https://github.com/zendframework/zf2" title="Zend Framework Source code" target="_blank">development</a>. As my first impressions, I have astonished by their new design. Removing require_once statements, using namespaces and lazy loading of components should boost the performance drastically. In addition, the new module system will be very flexible especially for 3rd party component developers. </p>
<p>To see it in action, I have decided to do a quick benchmark. I have used the <a href="https://github.com/zendframework/ZendSkeletonApplication" title="zend framework 2 skeleton application" target="_blank">zf2 skeleton application</a>, and my current zend framework 1.11 setting which I use in any of my PHP projects. The comparison is totally subjective and the aim is to have an overall impression. </p>
<p>I have used the apache benchmarking tool. The number of requests are 100 and the concurrency level is 5.<br />
<code>ab -c 5 -n 100 http://myUrl</code> </p>
<p>Here are the results</p>
<p>Zend Framework 2<br />
<code><br />
Server Software:        Apache/2.2.20<br />
Server Hostname:        localhost<br />
Server Port:            80</p>
<p>Document Path:          /zf2-sample/public<br />
Document Length:        351 bytes</p>
<p>Concurrency Level:      5<br />
Time taken for tests:   0.214 seconds<br />
Complete requests:      100<br />
Failed requests:        0<br />
Write errors:           0<br />
Non-2xx responses:      100<br />
Total transferred:      61900 bytes<br />
HTML transferred:       35100 bytes<br />
Requests per second:    466.58 [#/sec] (mean)<br />
Time per request:       10.716 [ms] (mean)<br />
Time per request:       2.143 [ms] (mean, across all concurrent requests)<br />
Transfer rate:          282.04 [Kbytes/sec] received</p>
<p>Connection Times (ms)<br />
              min  mean[+/-sd] median   max<br />
Connect:        0   10   6.3     11      33<br />
Processing:     0    1   2.6      0      15<br />
Waiting:        0    0   2.6      0      15<br />
Total:          1   11   6.1     11      33</p>
<p>Percentage of the requests served within a certain time (ms)<br />
  50%     11<br />
  66%     12<br />
  75%     13<br />
  80%     14<br />
  90%     16<br />
  95%     23<br />
  98%     32<br />
  99%     33<br />
 100%     33 (longest request)<br />
</code></p>
<p>Zend Framework 1.11</p>
<p><code><br />
Server Software:        Apache/2.2.20<br />
Server Hostname:        localhost<br />
Server Port:            80</p>
<p>Document Path:          /ad<br />
Document Length:        336 bytes</p>
<p>Concurrency Level:      5<br />
Time taken for tests:   0.410 seconds<br />
Complete requests:      100<br />
Failed requests:        0<br />
Write errors:           0<br />
Non-2xx responses:      100<br />
Total transferred:      58900 bytes<br />
HTML transferred:       33600 bytes<br />
Requests per second:    243.98 [#/sec] (mean)<br />
Time per request:       20.494 [ms] (mean)<br />
Time per request:       4.099 [ms] (mean, across all concurrent requests)<br />
Transfer rate:          140.33 [Kbytes/sec] received</p>
<p>Connection Times (ms)<br />
              min  mean[+/-sd] median   max<br />
Connect:        0   20  14.7     16      53<br />
Processing:     0    1   3.6      0      28<br />
Waiting:        0    1   3.5      0      28<br />
Total:          1   20  14.4     17      53</p>
<p>Percentage of the requests served within a certain time (ms)<br />
  50%     17<br />
  66%     29<br />
  75%     33<br />
  80%     34<br />
  90%     40<br />
  95%     46<br />
  98%     51<br />
  99%     53<br />
 100%     53 (longest request)<br />
</code></p>
<p>Conclusion: New version of Zend Framework is nearly double times faster that the current version.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2012/01/19/zend-framework-2-comparison/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting PHP headers without apache mod headers</title>
		<link>http://www.laplacesdemon.com/2011/02/08/getting-php-headers-without-apache-mod-headers/</link>
		<comments>http://www.laplacesdemon.com/2011/02/08/getting-php-headers-without-apache-mod-headers/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 08:50:52 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=352</guid>
		<description><![CDATA[It sometimes happen. You are in a restricted environment -like a shared hosting- and somehow you want to reach the custom headers without enabling the apache module &#8220;mod_headers&#8221;. Than following little function will do your job. function getHeaders() { $headers = array(); foreach ($_SERVER as $k =&#62; $v) { if (substr($k, 0, 5) == "HTTP_") [...]]]></description>
			<content:encoded><![CDATA[<p>It sometimes happen. You are in a restricted environment -like a shared hosting- and somehow you want to reach the custom headers without enabling the apache module &#8220;mod_headers&#8221;. Than following little function will do your job.</p>
<pre class="brush:php">function getHeaders()
    {
        $headers = array();
        foreach ($_SERVER as $k =&gt; $v)
        {
            if (substr($k, 0, 5) == "HTTP_")
            {
                $k = str_replace('_', ' ', substr($k, 5));
                $k = str_replace(' ', '_', strtolower($k));
                $headers[$k] = $v;
            }
        }
        return $headers;
    }</pre>
<p>P.S. If you have the possibility to use the mod_headers, than you&#8217;re free to use apache_get_headers() function.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2011/02/08/getting-php-headers-without-apache-mod-headers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Think beyond DB</title>
		<link>http://www.laplacesdemon.com/2010/11/12/think-beyond-db/</link>
		<comments>http://www.laplacesdemon.com/2010/11/12/think-beyond-db/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 08:31:11 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[oop]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=330</guid>
		<description><![CDATA[I found a good presentation by the project lead of Zend Framework. He explains the data persistance and why good OO programming instead of refactoring is saves a lot of time. Architecting Your Models View more presentations from Matthew Weier O&#8217;Phinney.]]></description>
			<content:encoded><![CDATA[<p>I found a good presentation by the project lead of Zend Framework. He explains the data persistance and why good OO programming instead of refactoring is saves a lot of time.</p>
<div style="width:425px" id="__ss_2316754"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/weierophinney/architecting-your-models" title="Architecting Your Models">Architecting Your Models</a></strong><object id="__sse2316754" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=architecting-your-models-091022014453-phpapp02&#038;stripped_title=architecting-your-models&#038;userName=weierophinney" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse2316754" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=architecting-your-models-091022014453-phpapp02&#038;stripped_title=architecting-your-models&#038;userName=weierophinney" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/weierophinney">Matthew Weier O&rsquo;Phinney</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2010/11/12/think-beyond-db/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework&#8217;da bir Bug</title>
		<link>http://www.laplacesdemon.com/2010/05/25/call-to-undefined-method-zend_view_helper_placeholder_containerksort/</link>
		<comments>http://www.laplacesdemon.com/2010/05/25/call-to-undefined-method-zend_view_helper_placeholder_containerksort/#comments</comments>
		<pubDate>Tue, 25 May 2010 17:27:26 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=249</guid>
		<description><![CDATA[Call to undefined method Zend_View_Helper_Placeholder_Container::ksort() Bu hatayı zend framework bir şekilde veriyor. Sanıyorum bir bug&#8217;dan kaynaklanıyor bu sorun. Yeni versionlarda bu hata giderilmiş olması lazım.  Lakin en kolay (geçici çözüm) ise aşağıdaki metodu Zend/View/Helper/Placeholder/Container/Abstract.php dosyasına eklemek. Oh yeah. /** * Sort the array by key * * @return array */ public function ksort() { $items [...]]]></description>
			<content:encoded><![CDATA[<p>Call to undefined method Zend_View_Helper_Placeholder_Container::ksort()</p>
<p>Bu hatayı zend framework bir şekilde veriyor. Sanıyorum bir bug&#8217;dan kaynaklanıyor bu sorun. Yeni versionlarda bu hata giderilmiş olması lazım.  Lakin en kolay (geçici çözüm) ise aşağıdaki metodu Zend/View/Helper/Placeholder/Container/Abstract.php dosyasına eklemek.</p>
<p>Oh yeah.</p>
<pre class="brush:php">
/**
* Sort the array by key
*
* @return array
*/

public function ksort()
{
$items = $this-&gt;getArrayCopy();
return ksort($items);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2010/05/25/call-to-undefined-method-zend_view_helper_placeholder_containerksort/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Htaccess dosyası</title>
		<link>http://www.laplacesdemon.com/2010/05/04/htaccess-dosyasi/</link>
		<comments>http://www.laplacesdemon.com/2010/05/04/htaccess-dosyasi/#comments</comments>
		<pubDate>Tue, 04 May 2010 10:30:05 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=245</guid>
		<description><![CDATA[Htaccess dosyasında kullandığım tanımlamaları sürekli unutuyorum. Burayı da not defteri gibi kullanmaya başladım. Yaptığım olay sırayla şu: Öncelikle uygulama ortamını belirliyorum. Buradaki ortama göre bir config dosyası yüklüyorum çünkü. Sonra optimizasyon için ETag ları set ediyorum. Sora Expire header&#8217;ları ayarılıyorum. Sonra her bişeyi Gzip ile sıkıştırıyorum (apache deflate mod sağolsun). Daha sonrası da klasik url [...]]]></description>
			<content:encoded><![CDATA[<p>Htaccess dosyasında kullandığım tanımlamaları sürekli unutuyorum. Burayı da not defteri gibi kullanmaya başladım. Yaptığım olay sırayla şu: Öncelikle uygulama ortamını belirliyorum. Buradaki ortama göre bir config dosyası yüklüyorum çünkü. Sonra optimizasyon için ETag ları set ediyorum. Sora Expire header&#8217;ları ayarılıyorum. Sonra her bişeyi Gzip ile sıkıştırıyorum (apache deflate mod sağolsun). Daha sonrası da klasik url rewrite</p>
<pre class="brush:bash">
SetEnv APPLICATION_ENV production

Header unset ETag
FileETag None
Header set Expires "Thu, 15 Apr 2012 20:00:00 GMT"
Header unset Last-Modified

# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2010/05/04/htaccess-dosyasi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Php Configure command doesnot work on mac osx with intel arch</title>
		<link>http://www.laplacesdemon.com/2010/02/24/php-configure-command-doesnot-work-on-mac-osx-with-intel-arch/</link>
		<comments>http://www.laplacesdemon.com/2010/02/24/php-configure-command-doesnot-work-on-mac-osx-with-intel-arch/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 12:05:37 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=225</guid>
		<description><![CDATA[I have wanted to run my php extensions that I&#8217;ve wrote earlier in a linux machine on mac os x snow leopard, but the intel architecture came with the snow leopard does not allow me to that. Basically my extensions are written in 32 bit but my development environment is in 64bits now. By the [...]]]></description>
			<content:encoded><![CDATA[<p>I have wanted to run my php extensions that I&#8217;ve wrote earlier in a linux machine on mac os x snow leopard, but the intel architecture came with the snow leopard does not allow me to that. Basically my extensions are written in 32 bit but my development environment is in 64bits now. By the way I am using Zend Server CE for now.</p>
<p>Normally you should build php for your new extension by running the following commands</p>
<blockquote><p>phpize<br />
./configure (add some configuration parameters here)<br />
make</p></blockquote>
<p>But it won&#8217;t help and gives an error like this:</p>
<blockquote><p>mach-o, but wrong architecture in Unknown on line 0</p></blockquote>
<p>The solution is to add some extra build parameters before the configuration command:</p>
<blockquote><p>MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS=&#8217;-O3 -fno-common -arch i386 -arch x86_64&#8242; LDFLAGS=&#8217;-O3 -arch i386 -arch x86_64&#8242; CXXFLAGS=&#8217;-O3 -fno-common -arch i386 -arch x86_64&#8242; ./configure</p></blockquote>
<p>Then you&#8217;re ready to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2010/02/24/php-configure-command-doesnot-work-on-mac-osx-with-intel-arch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scalability in PHP</title>
		<link>http://www.laplacesdemon.com/2009/11/07/scalability-in-php/</link>
		<comments>http://www.laplacesdemon.com/2009/11/07/scalability-in-php/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 16:47:07 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=196</guid>
		<description><![CDATA[PHP nin sevdiğim tarafı iyi scale edilebiliyor olması. Bu konuda güzel bi prezentasyon buldum. Scalability In PHP View more presentations from Ian Selby.]]></description>
			<content:encoded><![CDATA[<p>PHP nin sevdiğim tarafı iyi scale edilebiliyor olması. Bu konuda güzel bi prezentasyon buldum.</p>
<div style="width:425px;text-align:left" id="__ss_702265"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/ianselby/scalability-in-php-presentation" title="Scalability In PHP">Scalability In PHP</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=scalability-in-php-1225297093113032-9&#038;stripped_title=scalability-in-php-presentation" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=scalability-in-php-1225297093113032-9&#038;stripped_title=scalability-in-php-presentation" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/ianselby">Ian Selby</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2009/11/07/scalability-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shared Hosting için Zend Framework kurulumu</title>
		<link>http://www.laplacesdemon.com/2009/10/29/shared-hosting-icin-htaccess-ile-zend-framework-kurulumu/</link>
		<comments>http://www.laplacesdemon.com/2009/10/29/shared-hosting-icin-htaccess-ile-zend-framework-kurulumu/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 10:54:13 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[zend frameword]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=194</guid>
		<description><![CDATA[dertli bir iş. en büyük sıkıntı da shared hostinglerde document root değiştirilemediği için oluyor. zend framework için önerilen dizin yapısında public klasörü rootda yer almıyor. bu bir çok açıdan tercih edilmesi gereken bir durum. ancak shared hostinglerdeki document root olan httpdocs ya da public_html klasörünün bir üzerinde değişiklik yapılamadığı için aşağıdaki kodu root dizindeki .htaccess [...]]]></description>
			<content:encoded><![CDATA[<p>dertli bir iş. en büyük sıkıntı da shared hostinglerde <strong>document root</strong> değiştirilemediği için oluyor. zend framework için önerilen dizin yapısında <strong>public</strong> klasörü rootda yer almıyor. bu bir çok açıdan tercih edilmesi gereken bir durum. ancak shared hostinglerdeki document root olan httpdocs ya da public_html klasörünün bir üzerinde değişiklik yapılamadığı için aşağıdaki kodu root dizindeki .htaccess dosyasının içine kopyalayın. public dizinindeki .htaccess dosyasını da kaldırın. mis gibi.</p>
<pre class="brush:bash">
RewriteEngine On

RewriteRule ^\.htaccess$ - [F]

RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ /public/index.php [NC,L]

RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ /public/$1

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]

RewriteRule ^public/.*$ /public/index.php [NC,L]</pre>
<p>kaynak: <a href="http://www.alberton.info/zend_framework_mod_rewrite_shared_hosting.html" target="_blank">şurası</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2009/10/29/shared-hosting-icin-htaccess-ile-zend-framework-kurulumu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zend Studio ile Xdebug Kullanmak</title>
		<link>http://www.laplacesdemon.com/2009/09/16/zend-studio-ile-xdebug-kullanmak/</link>
		<comments>http://www.laplacesdemon.com/2009/09/16/zend-studio-ile-xdebug-kullanmak/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 10:26:34 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=187</guid>
		<description><![CDATA[Oldukça uzun süredir Zend debugger kullanıyordum. Halimden de memnundum açıkçası, çünkü debugging olayından beklentim remote debugging den ibaretti ve Zend debugger da sorunsuz çalışıyordu. İşletim sistemi değiştirip mac&#8217;e geçmemle birlikte Xdebug&#8217;ı denemeye karar verdim, ve şimdi bi sürü &#8220;fancy&#8221; özelliğiyle birlikte Xdebug&#8217;ın Zend debugger&#8217;dan çok daha iyi olduğunu anlamış bulunuyorum. Mac&#8217;e geçmemle beraber uzun süredir [...]]]></description>
			<content:encoded><![CDATA[<p>Oldukça uzun süredir Zend debugger kullanıyordum. Halimden de memnundum açıkçası, çünkü debugging olayından beklentim remote debugging den ibaretti ve Zend debugger da sorunsuz çalışıyordu. İşletim sistemi değiştirip mac&#8217;e geçmemle birlikte Xdebug&#8217;ı denemeye karar verdim, ve şimdi bi sürü &#8220;fancy&#8221; özelliğiyle birlikte Xdebug&#8217;ın Zend debugger&#8217;dan çok daha iyi olduğunu anlamış bulunuyorum.</p>
<p>Mac&#8217;e geçmemle beraber uzun süredir kullandığım Zend Studio 5.5 ve Aptana&#8217;dan da Zend Studio 7&#8242;ye geçmeye karar verdim. Zend Studio 7 eclipse üzerine kurulmuş harika bir ide. Gerçi ben hala alışabilmiş değilim ama artık bir değişikik yapmam şarttı.</p>
<p>Neyse, Zend Studio 7 malesef debugger olarak sadece Zend Debugger&#8217;a izin veriyor. Xdebug disable edilmiş durumda. Ancak ufak bir trick ile bunu değiştirmek mümkün. Şöyleki;</p>
<p>1. Zend Studio folder&#8217;a gidilir. cd /Applications/Zend/Zend\ Studio\ -\ 7.0.0<br />
2. cd pluginsmkdir disabled<br />
3. mkdir disabled<br />
4. mv com.zend.php.debug* disabled<br />
5. Bir de configurasyon dosyasında ufak bir değişiklik yapmamız gerek. open -a TextWrangler com.zend.php_&lt;ZSE_version_number&gt;/plugin_customization.ini<br />
6. ‘org.eclipse.ui.workbench/UIActivities.com.zend.php.debug.ui.XDebugActivity’ alanının değerini ‘true’ olarak değiştir.<br />
7. Zend Studio&#8217;yu yeniden başlat.<br />
8. Preferences içinde PHP -&gt; Debug sayfasında gerekli değişiklikler yapılır (debugger olarak Xdebug seç, PHP executable path i göster vb.)</p>
<p><code>Afiyet olsun.</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2009/09/16/zend-studio-ile-xdebug-kullanmak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Date ile tarih aralığı hesaplamak</title>
		<link>http://www.laplacesdemon.com/2009/04/02/zend-date-ile-tarih-araligi-hesaplamak/</link>
		<comments>http://www.laplacesdemon.com/2009/04/02/zend-date-ile-tarih-araligi-hesaplamak/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 19:25:03 +0000</pubDate>
		<dc:creator>solomon</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[zend_date]]></category>

		<guid isPermaLink="false">http://www.laplacesdemon.com/?p=142</guid>
		<description><![CDATA[çok basit olsa da ben yine de buraya yazıyorum. yapmaya çalışılan kaç yaşında olduğunu hesaplamak.  tek yaptığım da iki timestamp&#8217;ı (biri şu anki tarih, diğeri doğum günü) birbirinden çıkartmak. küsüratlı bir rakam elde edilmek istenmiyorsa floor fonksiyonuyla yuvarlana da bilir. bir de 365 e bölmek istenmeyebilir. o ayrı. $now = new Zend_Date(); $dob = new [...]]]></description>
			<content:encoded><![CDATA[<p>çok basit olsa da ben yine de buraya yazıyorum. yapmaya çalışılan kaç yaşında olduğunu hesaplamak.  tek yaptığım da iki timestamp&#8217;ı (biri şu anki tarih, diğeri doğum günü) birbirinden çıkartmak. küsüratlı bir rakam elde edilmek istenmiyorsa floor fonksiyonuyla yuvarlana da bilir. bir de 365 e bölmek istenmeyebilir. o ayrı.</p>
<pre class="brush:php">
$now = new Zend_Date();
$dob = new Zend_Date("954686860", Zend_Date::TIMESTAMP );
echo floor(($now-&gt;getTimestamp() - $dob-&gt;getTimestamp()) / (24 * 60 * 60)) / 365;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.laplacesdemon.com/2009/04/02/zend-date-ile-tarih-araligi-hesaplamak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  www.laplacesdemon.com/cat/programming/php/feed/ ) in 0.11650 seconds, on Feb 6th, 2012 at 4:24 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 6th, 2012 at 5:24 pm UTC -->
