{"id":290265,"date":"2018-10-03T17:20:02","date_gmt":"2018-10-03T13:20:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=290265"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=290265","title":{"rendered":"Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 JPHP"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p>\u041b\u044e\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0438\u0448\u0443\u0442 \u043a\u043e\u0434 \u043d\u0430 PHP \u0441\u0434\u0435\u043b\u0430\u044e\u0442 \u0432\u0441\u0451 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u044f\u0437\u044b\u043a\u0438. \u0414\u0430, \u044f \u0432 \u043a\u0443\u0440\u0441\u0435 \u0447\u0442\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0443\u0436\u0435 \u0431\u044b\u043b <a href=\"https:\/\/habr.com\/post\/106075\/\">\u0441\u043f\u043e\u0441\u043e\u0431<\/a> \u043f\u0438\u0441\u0430\u0442\u044c Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 PHP, \u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0434 \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0441 Java JPHP.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/an\/wt\/ni\/anwtnimygyt5vbxjo5idig80mn8.jpeg\" alt=\"logo\"\/><\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"o-yazyke-jphp\">\u041e \u044f\u0437\u044b\u043a\u0435 JPHP<\/h2>\n<p>  <\/p>\n<p>\u042f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441. \u0410 \u0447\u0442\u043e \u0437\u0430 JPHP? \u041e\u0442\u0432\u0435\u0442 \u0435\u0441\u0442\u044c \u0442\u0443\u0442-\u0436\u0435, \u043d\u0430 \u0425\u0430\u0431\u0440\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/post\/216651\/\">JPHP \u2014 \u041d\u043e\u0432\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a php \u0434\u043b\u044f Java VM + JIT<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/post\/218021\/\">JPHP \u2014 \u041a\u0430\u043a \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0443, \u0430 \u043c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c. \u0417\u0430 \u0442\u0435 4 \u0433\u043e\u0434\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0448\u043b\u0438 \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043f\u043e\u0441\u0442\u043e\u0432 \u043e JPHP \u044d\u0442\u043e\u0442 \u044f\u0437\u044b\u043a \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0441\u044f \u0432 \u043b\u0443\u0447\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 <a href=\"https:\/\/github.com\/jphp-group\/jphp\/tree\/master\/packager\">jppm<\/a> \u043f\u0440\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c \u0442\u043e\u0436\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c.<\/p>\n<p>  <\/p>\n<h2 id=\"kak-vsyo-nachalos\">\u041a\u0430\u043a \u0432\u0441\u0451 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c<\/h2>\n<p>  <\/p>\n<p>\u0412\u0441\u0451 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u043e\u0435\u043c\u0443 \u0434\u0440\u0443\u0433\u0443 \u043f\u0440\u0438\u0448\u043b\u0430 \u0438\u0434\u0435\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f Android \u043d\u0430 JPHP. \u042f \u0434\u0430\u043b \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0435\u043c\u0443 \u0442\u043e\u0442 \u043f\u043e\u0441\u0442, \u043f\u0440\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435, \u043d\u043e \u0435\u043c\u0443 \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0439 PHP. \u041d\u0443, \u0430 \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0438\u0448\u0443\u0442 \u043d\u0430 \u043d\u0438\u043a\u043e\u043c\u0443 \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 JPHP \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u0441\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0438\u0441\u0442\u0430\u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u043c\u044b \u0442\u043e\u0433\u0434\u0430 \u043d\u0435 \u043d\u0430\u0448\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u0430, \u043a\u0440\u043e\u043c\u0435 \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c JavaFXPorts. \u0414\u0430 \u0438 \u0441\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c \u044d\u0442\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0445\u043e\u0442\u0435\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 GUI \u0434\u0432\u0438\u0436\u043a\u0430 \u0434\u043b\u044f JPHP \u0437\u0430 2 \u0433\u043e\u0434\u0430, \u0442\u0430\u043a \u043d\u0438\u0447\u0435\u0433\u043e \u0438 \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0432.<\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f \u2014 \u00ab\u041a\u0442\u043e \u043a\u0440\u043e\u043c\u0435 \u0442\u0435\u0431\u044f\u00bb?.. \u042f \u0431\u0440\u043e\u0441\u0438\u043b\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u044f\u0437\u044b\u043a\u0430 JPHP.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0434\u0435\u043b\u044c \u0431\u044b\u043b\u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u043c\u0438. \u042f \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e build \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043b\u044f gradle \u0438 \u0432\u0441\u0451 \u0431\u044b \u0445\u043e\u0440\u043e\u0448\u043e, apk \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0441\u044f, \u043d\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b\u0434\u0430\u0432\u0430\u043b\u0430\u0441\u044c \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043c\u043d\u0435 \u043d\u0430 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u042f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u043b \u0447\u0442\u043e \u043e\u043d\u0430 \u0438\u0437-\u0437\u0430 JPHP \u043d\u043e \u043d\u0435 \u0432\u0438\u0434\u0435\u043b \u044f \u043f\u0440\u0435\u0436\u0434\u0435 \u0442\u0430\u043a\u0443\u044e. \u0421\u0435\u0439\u0447\u0430\u0441 \u044f \u043c\u043e\u0433\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u043e \u0447\u0442\u043e \u044d\u0442\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0431\u044b\u043b\u0430 \u0438\u0437 \u0437\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u0430\u0439\u0442-\u043a\u043e\u0434\u0430. DalvikVM \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u043c\u043e\u0433 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0431\u0430\u0439\u0442-\u043a\u043e\u0434 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u043b\u044f JVM. \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0441\u0442\u0430\u043b\u043e \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u043c \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u0435\u043c. \u0422\u0430\u043a \u043a\u0430\u043a PHP \u0444\u0430\u0439\u043b\u044b \u0432 JPHP \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432\u043e\u0432\u0441\u0435. \u0411\u044b\u043b \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 phb, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0440\u0435\u0448\u0430\u043b\u043e \u043d\u0430\u0448\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0432\u043e\u0432\u0441\u0435. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u0442\u0430\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0447\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u043e \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u043e \u0440\u044f\u0434 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 include \u0438 eval, \u0441\u043f\u0430\u0441\u0438\u0431\u043e, Dalvik. <\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u0440\u043e\u0431 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u044f \u0432\u0441\u0451 \u0436\u0435 \u0441\u0443\u043c\u0435\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u0443\u044e \u043f\u0435\u0440\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e. \u0415\u0451 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f <a href=\"https:\/\/github.com\/VenityStudio\/android\">\u0442\u0443\u0442<\/a>. \u042d\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u044b\u043b\u0430 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u0430\u044f. \u0414\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c JavaFX \u043d\u0430 Android \u044d\u0442\u043e \u043c\u0430\u0437\u0430\u0445\u0438\u0437\u043c.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e \u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u0440\u0438\u043d\u044f\u043b \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0451 \u0441 \u0447\u0438\u0441\u0442\u043e\u0433\u043e \u043b\u0438\u0441\u0442\u0430. \u041f\u0440\u0438\u043d\u044f\u043b \u044f \u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e. \u041f\u043e \u044d\u0442\u043e\u043c\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f JPHP \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u044b\u0440\u043e\u0432\u0430\u0442\u0430. \u041d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  <\/p>\n<h2 id=\"kak-eto-rabotaet\">\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h2>\n<p>  <\/p>\n<p>\u0412\u0441\u0451 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0442\u043e\u0433\u043e \u0447\u0442\u043e jppm \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u0432\u0430\u0448\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u043e\u0434\u0438\u043d jar \u0444\u0430\u0439\u043b. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044f \u0432 \u043d\u0438\u0445 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b <code>php<\/code> \u0432 <code>class<\/code> \u0444\u0430\u0439\u043b\u044b. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 jar \u0444\u0430\u0439\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043a gradle. \u0410 \u043e\u043d \u0443\u0436\u0435 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u0438 class \u0444\u0430\u0439\u043b\u044b \u0432 dex. \u0412 \u044d\u0442\u043e\u043c \u0432\u0435\u0441\u044c \u0441\u0435\u043a\u0440\u0435\u0442. <\/p>\n<p>  <\/p>\n<p>\u0421 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0441\u0451 \u0441\u043b\u043e\u0436\u043d\u0435\u0439. \u0412 <code>AndroidManifest.xml<\/code> \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d <code>BootstrapActivity<\/code> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0432\u0435\u0441\u044c JPHP. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u044d\u0442\u043e\u0442 <code>BootstrapActivity<\/code> \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0437 JPHP. \u0414\u043b\u044f <code>Activity<\/code> \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043e\u0434\u043d\u043e\u0438\u043c\u0451\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b. <\/p>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;? use php\\android\\app\\Application;  $bootstrapActivity = Application::getMainActivity();<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 <code>BootstrapActivity<\/code> \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u044b\u043b \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d JPHP.<\/p>\n<p>  <\/p>\n<p>\u042f \u0434\u0443\u043c\u0430\u044e \u0432\u0430\u043c \u0443\u0436\u0435 \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 JPHP. <\/p>\n<p>  <\/p>\n<h2 id=\"nebolshoy-primer\">\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/h2>\n<p>  <\/p>\n<p>\u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043b\u0438\u043a\u0435\u0440 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 :<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;? use php\\android\\app\\Application; use php\\android\\widget\\Button;  $activity = Application::getMainActivity(); \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c BootstrapActivity $activity-&gt;setTitle(&quot;test&quot;); \/\/ \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a   $activity-&gt;setContentView($button = new Button($activity)); \/\/ \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443  $button-&gt;text = &quot;Hello from JPHP!&quot;; \/\/ \u041d\u0443 \u0442\u0443\u0442 \u0432\u0441\u0451 \u043f\u043e\u043d\u044f\u0442\u043d\u043e $button-&gt;on(&quot;click&quot;, function () use ($button) { \/\/ \u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 ...     $GLOBALS['clicks']++;     $b-&gt;text = &quot;Clicks: &quot; . $GLOBALS['clicks']; });<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043a\u043d\u043e\u043f\u043a\u043e\u0439:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lf\/04\/3w\/lf043wq0xgwej0yty6islmvwtnk.jpeg\"\/><\/p>\n<p>  <\/p>\n<h2 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u042f \u043d\u0435 \u0434\u0443\u043c\u0430\u044e \u0447\u0442\u043e \u043c\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u043e\u043c\u0443 \u043b\u0438\u0431\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043d\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u0438 10% Android API. \u0414\u0430 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f Android \u043d\u0430 PHP \u043d\u0435 \u043a\u0430\u043d\u043e\u043d. \u041d\u043e \u0434\u0443\u043c\u0430\u044e \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430\u0439\u0434\u0451\u0442 \u0441\u0432\u043e\u044e \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044e. <\/p>\n<p>  <\/p>\n<p>\u2192 <a href=\"https:\/\/github.com\/VenityStudio\/jphp-android\">Github \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><br \/>  \u2192 <a href=\"https:\/\/github.com\/jphp-group\">Github JPHP<\/a><\/p>\n<\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/425223\/\"> https:\/\/habr.com\/post\/425223\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p>\u041b\u044e\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0438\u0448\u0443\u0442 \u043a\u043e\u0434 \u043d\u0430 PHP \u0441\u0434\u0435\u043b\u0430\u044e\u0442 \u0432\u0441\u0451 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u044f\u0437\u044b\u043a\u0438. \u0414\u0430, \u044f \u0432 \u043a\u0443\u0440\u0441\u0435 \u0447\u0442\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0443\u0436\u0435 \u0431\u044b\u043b <a href=\"https:\/\/habr.com\/post\/106075\/\">\u0441\u043f\u043e\u0441\u043e\u0431<\/a> \u043f\u0438\u0441\u0430\u0442\u044c Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 PHP, \u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0434 \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0441 Java JPHP.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/an\/wt\/ni\/anwtnimygyt5vbxjo5idig80mn8.jpeg\" alt=\"logo\"\/><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-290265","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=290265"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290265\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=290265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=290265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=290265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}